diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2008-12-24 14:08:15 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-12-24 14:08:15 +0000 |
commit | 68aa6bd29a0ea8c3e5b981677ace1ac188469bb8 (patch) | |
tree | bad33f1f9cd6d3efde039b2d11d250ad2dc9a960 /phpBB/includes/acp/acp_jabber.php | |
parent | 799ee3caae5de9f044ffad3e4d34010365a0005d (diff) | |
download | forums-68aa6bd29a0ea8c3e5b981677ace1ac188469bb8.tar forums-68aa6bd29a0ea8c3e5b981677ace1ac188469bb8.tar.gz forums-68aa6bd29a0ea8c3e5b981677ace1ac188469bb8.tar.bz2 forums-68aa6bd29a0ea8c3e5b981677ace1ac188469bb8.tar.xz forums-68aa6bd29a0ea8c3e5b981677ace1ac188469bb8.zip |
put acp, mcp and ucp into modules/ directory
git-svn-id: file:///svn/phpbb/trunk@9223 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_jabber.php')
-rw-r--r-- | phpBB/includes/acp/acp_jabber.php | 129 |
1 files changed, 0 insertions, 129 deletions
diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php deleted file mode 100644 index 48ad5c5986..0000000000 --- a/phpBB/includes/acp/acp_jabber.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php -/** -* -* @package acp -* @version $Id$ -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License -* -* @todo Check/enter/update transport info -*/ - -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -/** -* @package acp -*/ -class acp_jabber -{ - var $u_action; - - function main($id, $mode) - { - global $db, $user, $auth, $template, $config; - - $user->add_lang('acp/board'); - - include_once(PHPBB_ROOT_PATH . 'includes/functions_jabber.' . PHP_EXT); - - $action = request_var('action', ''); - $submit = request::is_set_post('submit'); - - if ($mode != 'settings') - { - return; - } - - $this->tpl_name = 'acp_jabber'; - $this->page_title = 'ACP_JABBER_SETTINGS'; - - $jab_enable = request_var('jab_enable', $config['jab_enable']); - $jab_host = request_var('jab_host', $config['jab_host']); - $jab_port = request_var('jab_port', $config['jab_port']); - $jab_username = request_var('jab_username', $config['jab_username']); - $jab_password = request_var('jab_password', $config['jab_password']); - $jab_package_size = request_var('jab_package_size', $config['jab_package_size']); - $jab_use_ssl = request_var('jab_use_ssl', $config['jab_use_ssl']); - - $form_name = 'acp_jabber'; - add_form_key($form_name); - - if ($submit) - { - if (!check_form_key($form_name)) - { - trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING); - } - - $error = array(); - - $message = $user->lang['JAB_SETTINGS_CHANGED']; - $log = 'JAB_SETTINGS_CHANGED'; - - // Is this feature enabled? Then try to establish a connection - if ($jab_enable) - { - $jabber = new jabber($jab_host, $jab_port, $jab_username, $jab_password, $jab_use_ssl); - - if (!$jabber->connect()) - { - trigger_error($user->lang['ERR_JAB_CONNECT'] . '<br /><br />' . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING); - } - - // We'll try to authorise using this account - if (!$jabber->login()) - { - trigger_error($user->lang['ERR_JAB_AUTH'] . '<br /><br />' . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING); - } - - $jabber->disconnect(); - } - else - { - // This feature is disabled. - // We update the user table to be sure all users that have IM as notify type are set to both as notify type - $sql_ary = array( - 'user_notify_type' => NOTIFY_BOTH, - ); - - $sql = 'UPDATE ' . USERS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' - WHERE user_notify_type = ' . NOTIFY_IM; - $db->sql_query($sql); - } - - set_config('jab_enable', $jab_enable); - set_config('jab_host', $jab_host); - set_config('jab_port', $jab_port); - set_config('jab_username', $jab_username); - set_config('jab_password', $jab_password); - set_config('jab_package_size', $jab_package_size); - set_config('jab_use_ssl', $jab_use_ssl); - - add_log('admin', 'LOG_' . $log); - trigger_error($message . adm_back_link($this->u_action)); - } - - $template->assign_vars(array( - 'U_ACTION' => $this->u_action, - 'JAB_ENABLE' => $jab_enable, - 'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/">', '</a>'), - 'JAB_HOST' => $jab_host, - 'JAB_PORT' => $jab_port, - 'JAB_USERNAME' => $jab_username, - 'JAB_PASSWORD' => $jab_password, - 'JAB_PACKAGE_SIZE' => $jab_package_size, - 'JAB_USE_SSL' => $jab_use_ssl, - 'S_CAN_USE_SSL' => jabber::can_use_ssl(), - 'S_GTALK_NOTE' => (!@function_exists('dns_get_record')) ? true : false, - )); - } -} - -?>
\ No newline at end of file |