From cda8083ba73d8884780a3e802b32b0441d2170b0 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 2 Sep 2007 17:24:56 +0000 Subject: fixing some bugs git-svn-id: file:///svn/phpbb/trunk@8075 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/style/acp_jabber.html | 3 +++ phpBB/adm/style/simple_footer.html | 2 +- phpBB/docs/CHANGELOG.html | 4 ++++ phpBB/includes/acp/acp_jabber.php | 1 + phpBB/includes/acp/acp_language.php | 7 ++++++- phpBB/includes/acp/acp_permissions.php | 10 ++++++++++ phpBB/includes/functions_jabber.php | 4 ---- phpBB/includes/functions_messenger.php | 12 ++++++------ phpBB/includes/functions_posting.php | 7 +++++++ phpBB/includes/session.php | 2 +- phpBB/includes/ucp/ucp_pm_viewmessage.php | 8 ++++++++ phpBB/language/en/acp/board.php | 3 +-- phpBB/language/en/acp/permissions.php | 3 ++- phpBB/language/en/common.php | 2 ++ phpBB/styles/prosilver/template/drafts.html | 2 +- phpBB/styles/prosilver/template/memberlist_im.html | 2 ++ phpBB/styles/prosilver/template/posting_editor.html | 2 +- phpBB/styles/prosilver/template/ucp_pm_viewmessage.html | 4 ++-- phpBB/styles/prosilver/theme/bidi.css | 4 ++-- phpBB/styles/subsilver2/template/memberlist_im.html | 2 ++ phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html | 2 +- phpBB/viewtopic.php | 1 - 22 files changed, 63 insertions(+), 24 deletions(-) diff --git a/phpBB/adm/style/acp_jabber.html b/phpBB/adm/style/acp_jabber.html index 4d667d2966..43f7f51375 100644 --- a/phpBB/adm/style/acp_jabber.html +++ b/phpBB/adm/style/acp_jabber.html @@ -17,6 +17,9 @@
{L_ACP_JABBER_SETTINGS} + +

{L_JAB_GTALK_NOTE}

+

{L_JAB_ENABLE_EXPLAIN}
diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html index f0564cb2cd..65cf724c2f 100644 --- a/phpBB/adm/style/simple_footer.html +++ b/phpBB/adm/style/simple_footer.html @@ -1,4 +1,4 @@ -
{L_CLOSE_WINDOW}
+
{L_CLOSE_WINDOW}


diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index ebd587f16d..f7765d945b 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -195,6 +195,10 @@ p a {
  • [Fix] Adjust google adsense bot information (Bug #14296)
  • [Fix] Fix horizontal scrollbar problem in IE6 (Bug #14228) - fix provided by Danny-dev
  • [Fix] Use correct size values in ACP user signature screen (Bug #13367)
  • +
  • [Fix] Attachment Place inline won't work with single quotes (Bug #14291)
  • +
  • [Fix] Unable to save email templates through ACP language page (Bug #14266)
  • +
  • [Fix] Correctly set user style for guest user (able to be changed within user management)
  • +
  • [Change] Moved note about dns_get_record function for using GTalk (Jabber) from Jabber log to Jabber ACP panel
  • 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 .= '
    ' . htmlspecialchars($calling_page) . '

    ' . $msg . '
    '; + $message .= '
    ' . htmlspecialchars($calling_page) . '

    ' . $msg . '
    '; 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
    ' . $this->jabber->get_log()); + $this->error('JABBER', $user->lang['ERR_JAB_CONNECT'] . '
    ' . $this->jabber->get_log()); return false; } if (!$this->jabber->login()) { - $this->error('JABBER', 'Could not authorise on Jabber server
    ' . $this->jabber->get_log()); + $this->error('JABBER', $user->lang['ERR_JAB_AUTH'] . '
    ' . $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&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'], diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index a1f311ff75..2a640ba4fb 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -424,10 +424,9 @@ $lang = array_merge($lang, array( $lang = array_merge($lang, array( 'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use of Jabber for instant messaging and board notifications. Jabber is an open source protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Please be sure to enter already registered account details - phpBB will use the details you enter here as is.', - 'ERR_JAB_AUTH' => 'Could not authorise on Jabber server.', - 'ERR_JAB_CONNECT' => 'Could not connect to Jabber server.', 'JAB_ENABLE' => 'Enable Jabber', 'JAB_ENABLE_EXPLAIN' => 'Enables use of Jabber messaging and notifications.', + 'JAB_GTALK_NOTE' => 'Please note that using GTalk will not work due to the dns_get_record function not found. This function is not available in PHP4 and not implemented on Windows platforms, nor does it (currently) work on *BSD systems.', 'JAB_PACKAGE_SIZE' => 'Jabber package size', 'JAB_PACKAGE_SIZE_EXPLAIN' => 'This is the number of messages sent in one package. If set to 0 the message is sent immediately and will not be queued for later sending.', 'JAB_PASSWORD' => 'Jabber password', diff --git a/phpBB/language/en/acp/permissions.php b/phpBB/language/en/acp/permissions.php index 3deeb344af..0b50c8a7c2 100644 --- a/phpBB/language/en/acp/permissions.php +++ b/phpBB/language/en/acp/permissions.php @@ -265,7 +265,8 @@ $lang = array_merge($lang, array( 'VIEW_GLOBAL_PERMS' => 'Global permissions', 'VIEW_PERMISSIONS' => 'View permissions', - 'WRONG_PERMISSION_TYPE' => 'Wrong permission type selected.', + 'WRONG_PERMISSION_TYPE' => 'Wrong permission type selected.', + 'WRONG_PERMISSION_SETTING_FORMAT' => 'The permission settings are in a wrong format, phpBB is not able to process them correctly.', )); ?> \ No newline at end of file diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 9b3ebbfe52..47bad2d3cd 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -160,6 +160,8 @@ $lang = array_merge($lang, array( 'ENCLOSURE' => 'Enclosure', 'ERR_CHANGING_DIRECTORY' => 'Unable to change directory.', 'ERR_CONNECTING_SERVER' => 'Error connecting to the server.', + 'ERR_JAB_AUTH' => 'Could not authorise on Jabber server.', + 'ERR_JAB_CONNECT' => 'Could not connect to Jabber server.', 'ERR_UNABLE_TO_LOGIN' => 'The specified username or password is incorrect.', 'ERR_WRONG_PATH_TO_PHPBB' => 'The phpBB path specified appears to be invalid.', 'EXPAND_VIEW' => 'Expand view', diff --git a/phpBB/styles/prosilver/template/drafts.html b/phpBB/styles/prosilver/template/drafts.html index 25a5681b70..838569ebf6 100644 --- a/phpBB/styles/prosilver/template/drafts.html +++ b/phpBB/styles/prosilver/template/drafts.html @@ -21,7 +21,7 @@
    -
      +
      • diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html index 717273baa3..7962230742 100644 --- a/phpBB/styles/prosilver/template/memberlist_im.html +++ b/phpBB/styles/prosilver/template/memberlist_im.html @@ -80,7 +80,9 @@ +{L_CLOSE_WINDOW} + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html index 8a3e582cb2..0a5285ff44 100644 --- a/phpBB/styles/prosilver/template/posting_editor.html +++ b/phpBB/styles/prosilver/template/posting_editor.html @@ -160,7 +160,7 @@
        {attach_row.FILENAME}
        -   +  
        diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index 2d76586262..539bd58dce 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -68,7 +68,7 @@
        {RANK_IMG}
         
        {L_POSTS}: {AUTHOR_POSTS}
        -
        {L_JOINED}: {AUTHOR_JOINED}
        +
        {L_JOINED}: {AUTHOR_JOINED}
        {L_LOCATION}: {AUTHOR_FROM}
        @@ -81,7 +81,7 @@
      • {L_ICQ}
      • {L_YIM}
      • {L_AIM}
      • -
      • {L_JABBER}
      • +
      • {L_JABBER}
      diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index 178805a484..74707ddaea 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -164,12 +164,12 @@ } *:first-child+html dl.details dd { - margin-right: 35%; + margin-right: 30%; float: none; } * html dl.details dd { - margin-right: 35%; + margin-right: 30%; float: none; } diff --git a/phpBB/styles/subsilver2/template/memberlist_im.html b/phpBB/styles/subsilver2/template/memberlist_im.html index 860bec608d..3f6a34ce36 100644 --- a/phpBB/styles/subsilver2/template/memberlist_im.html +++ b/phpBB/styles/subsilver2/template/memberlist_im.html @@ -132,6 +132,8 @@ + {L_CLOSE_WINDOW} + \ No newline at end of file diff --git a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html index 321bc28a40..a8c60a09b3 100644 --- a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html @@ -104,7 +104,7 @@ - + diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 0aa06721eb..e608baadd8 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1090,7 +1090,6 @@ while ($row = $db->sql_fetchrow($result)) } } $db->sql_freeresult($result); -unset($today); // Load custom profile fields if ($config['load_cpf_viewtopic']) -- cgit v1.2.1