mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-19 06:51:33 +02:00
fixing some bugs
git-svn-id: file:///svn/phpbb/trunk@8075 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -93,6 +93,7 @@ class acp_jabber
|
||||
'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,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@@ -163,7 +163,12 @@ class acp_language
|
||||
case 'download_file':
|
||||
case 'upload_data':
|
||||
|
||||
if (!$lang_id || empty($_POST['entry']) || !is_array($_POST['entry']))
|
||||
if (!$lang_id || empty($_POST['entry']))
|
||||
{
|
||||
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($this->language_directory != 'email' && !is_array($_POST['entry']))
|
||||
{
|
||||
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
@@ -612,6 +612,16 @@ class acp_permissions
|
||||
list($ug_id, ) = each($psubmit);
|
||||
list($forum_id, ) = each($psubmit[$ug_id]);
|
||||
|
||||
$_POST['setting'] = 1;
|
||||
// We obtain and check $_POST['setting'][$ug_id][$forum_id] directly and not using request_var() because request_var()
|
||||
// currently does not support the amount of dimensions required. ;)
|
||||
// $auth_settings = request_var('setting', array(0 => array(0 => array('' => 0))));
|
||||
|
||||
if (empty($_POST['setting']) || empty($_POST['setting'][$ug_id]) || empty($_POST['setting'][$ug_id][$forum_id]) || !is_array($_POST['setting'][$ug_id][$forum_id]))
|
||||
{
|
||||
trigger_error('WRONG_PERMISSION_SETTING_FORMAT', E_USER_WARNING);
|
||||
}
|
||||
|
||||
$auth_settings = array_map('intval', $_POST['setting'][$ug_id][$forum_id]);
|
||||
|
||||
// Do we have a role we want to set?
|
||||
|
@@ -216,10 +216,6 @@ class jabber
|
||||
$server = $record[0]['target'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->add_to_log('Warning: dns_get_record() function not found. GTalk will not work.');
|
||||
}
|
||||
|
||||
$server = $use_ssl ? 'ssl://' . $server : $server;
|
||||
|
||||
|
@@ -275,7 +275,7 @@ class messenger
|
||||
break;
|
||||
}
|
||||
|
||||
$message .= '<br /><em>' . htmlspecialchars($calling_page) . '<em><br /><br />' . $msg . '<br />';
|
||||
$message .= '<br /><em>' . htmlspecialchars($calling_page) . '</em><br /><br />' . $msg . '<br />';
|
||||
add_log('critical', 'LOG_ERROR_' . $type, $message);
|
||||
}
|
||||
|
||||
@@ -465,13 +465,13 @@ class messenger
|
||||
|
||||
if (!$this->jabber->connect())
|
||||
{
|
||||
$this->error('JABBER', 'Could not connect to Jabber server<br />' . $this->jabber->get_log());
|
||||
$this->error('JABBER', $user->lang['ERR_JAB_CONNECT'] . '<br />' . $this->jabber->get_log());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->jabber->login())
|
||||
{
|
||||
$this->error('JABBER', 'Could not authorise on Jabber server<br />' . $this->jabber->get_log());
|
||||
$this->error('JABBER', $user->lang['ERR_JAB_AUTH'] . '<br />' . $this->jabber->get_log());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -541,7 +541,7 @@ class queue
|
||||
*/
|
||||
function process()
|
||||
{
|
||||
global $db, $config, $phpEx, $phpbb_root_path;
|
||||
global $db, $config, $phpEx, $phpbb_root_path, $user;
|
||||
|
||||
set_config('last_queue_run', time(), true);
|
||||
|
||||
@@ -604,13 +604,13 @@ class queue
|
||||
|
||||
if (!$this->jabber->connect())
|
||||
{
|
||||
messenger::error('JABBER', 'Could not connect to Jabber server');
|
||||
messenger::error('JABBER', $user->lang['ERR_JAB_CONNECT']);
|
||||
continue 2;
|
||||
}
|
||||
|
||||
if (!$this->jabber->login())
|
||||
{
|
||||
messenger::error('JABBER', 'Could not authorise on Jabber server');
|
||||
messenger::error('JABBER', $user->lang['ERR_JAB_AUTH']);
|
||||
continue 2;
|
||||
}
|
||||
|
||||
|
@@ -773,6 +773,7 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data)
|
||||
|
||||
$template->assign_block_vars('attach_row', array(
|
||||
'FILENAME' => basename($attach_row['real_filename']),
|
||||
'A_FILENAME' => addslashes(basename($attach_row['real_filename'])),
|
||||
'FILE_COMMENT' => $attach_row['attach_comment'],
|
||||
'ATTACH_ID' => $attach_row['attach_id'],
|
||||
'S_IS_ORPHAN' => $attach_row['is_orphan'],
|
||||
@@ -1627,6 +1628,12 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
|
||||
$sql_data[POSTS_TABLE]['stat'][] = 'post_edit_count = post_edit_count + 1';
|
||||
}
|
||||
else if (!$data['post_edit_reason'] && $mode == 'edit' && $auth->acl_get('m_edit', $data['forum_id']))
|
||||
{
|
||||
$sql_data[POSTS_TABLE]['sql'] = array(
|
||||
'post_edit_reason' => '',
|
||||
);
|
||||
}
|
||||
|
||||
// If the person editing this post is different to the one having posted then we will add a log entry stating the edit
|
||||
// Could be simplified by only adding to the log if the edit is not tracked - but this may confuse admins/mods
|
||||
|
@@ -1284,7 +1284,7 @@ class user extends session
|
||||
else
|
||||
{
|
||||
// Set up style
|
||||
$style = ($style) ? $style : ((!$config['override_user_style'] && $this->data['user_id'] != ANONYMOUS) ? $this->data['user_style'] : $config['default_style']);
|
||||
$style = ($style) ? $style : ((!$config['override_user_style']) ? $this->data['user_style'] : $config['default_style']);
|
||||
}
|
||||
|
||||
$sql = 'SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id, i.imageset_path, i.imageset_id, i.imageset_name
|
||||
|
@@ -191,6 +191,14 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
'EDITED_MESSAGE' => $l_edited_by,
|
||||
'MESSAGE_ID' => $message_row['msg_id'],
|
||||
|
||||
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $author_id) : '',
|
||||
'U_WWW' => (!empty($user_info['user_website'])) ? $user_info['user_website'] : '',
|
||||
'U_ICQ' => ($user_info['user_icq']) ? 'http://www.icq.com/people/webmsg.php?to=' . $user_info['user_icq'] : '',
|
||||
'U_AIM' => ($user_info['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $author_id) : '',
|
||||
'U_YIM' => ($user_info['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . $user_info['user_yim'] . '&.src=pg' : '',
|
||||
'U_MSN' => ($user_info['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $author_id) : '',
|
||||
'U_JABBER' => ($user_info['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $author_id) : '',
|
||||
|
||||
'U_INFO' => ($auth->acl_get('m_info') && $message_row['pm_forwarded']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'mode=pm_details&p=' . $message_row['msg_id'], true, $user->session_id) : '',
|
||||
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_EMAIL' => $user_info['email'],
|
||||
|
Reference in New Issue
Block a user