aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_jabber.php1
-rw-r--r--phpBB/includes/acp/acp_language.php7
-rw-r--r--phpBB/includes/acp/acp_permissions.php10
-rw-r--r--phpBB/includes/functions_jabber.php4
-rw-r--r--phpBB/includes/functions_messenger.php12
-rw-r--r--phpBB/includes/functions_posting.php7
-rw-r--r--phpBB/includes/session.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php8
8 files changed, 39 insertions, 12 deletions
diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php
index 9f02530b27..b1580a0736 100644
--- a/phpBB/includes/acp/acp_jabber.php
+++ b/phpBB/includes/acp/acp_jabber.php
@@ -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,
));
}
}
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index b59729c873..db636fc919 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -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);
}
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index 008e5f5494..d344656ca3 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -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?
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index 04f664139f..e3edcfc0be 100644
--- a/phpBB/includes/functions_jabber.php
+++ b/phpBB/includes/functions_jabber.php
@@ -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;
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index ae156436f0..90413d80de 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -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;
}
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 222f9a3843..6663acb5e2 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -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
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index a029388101..4d2d22a804 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -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
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index 492ce08b45..24571bec19 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -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&amp;mode=compose&amp;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&amp;action=aim&amp;u=' . $author_id) : '',
+ 'U_YIM' => ($user_info['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . $user_info['user_yim'] . '&amp;.src=pg' : '',
+ 'U_MSN' => ($user_info['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=msnm&amp;u=' . $author_id) : '',
+ 'U_JABBER' => ($user_info['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $author_id) : '',
+
'U_INFO' => ($auth->acl_get('m_info') && $message_row['pm_forwarded']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'mode=pm_details&amp;p=' . $message_row['msg_id'], true, $user->session_id) : '',
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&amp;mode=compose&amp;action=delete&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_EMAIL' => $user_info['email'],