diff --git a/phpBB/adm/images/progress_bar.gif b/phpBB/adm/images/progress_bar.gif old mode 100755 new mode 100644 diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index 358e5a4bf2..c0fa2fdddb 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -45,7 +45,7 @@ define('IN_ADMIN', true); $phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './'; // Some oft used variables -$safe_mode = (@ini_get('safe_mode') == '1' || @strtolower(ini_get('safe_mode')) === 'on') ? true : false; +$safe_mode = (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false; $file_uploads = (@ini_get('file_uploads') == '1' || strtolower(@ini_get('file_uploads')) === 'on') ? true : false; $module_id = request_var('i', ''); $mode = request_var('mode', ''); @@ -116,6 +116,7 @@ function adm_page_header($page_title) 'ROOT_PATH' => $phpbb_admin_path, 'U_LOGOUT' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'), + 'U_ADM_LOGOUT' => append_sid("{$phpbb_admin_path}index.$phpEx", 'action=admlogout'), 'U_ADM_INDEX' => append_sid("{$phpbb_admin_path}index.$phpEx"), 'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"), diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index e4662d9280..636d4ded7b 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -96,7 +96,7 @@ « {L_BACK} -

{L_TITLE} :: {FORUM_NAME}

+

{L_TITLE} :: {FORUM_NAME}

{L_FORUM_EDIT_EXPLAIN}

diff --git a/phpBB/adm/style/acp_inactive.html b/phpBB/adm/style/acp_inactive.html old mode 100755 new mode 100644 diff --git a/phpBB/adm/style/install_convert.html b/phpBB/adm/style/install_convert.html old mode 100755 new mode 100644 diff --git a/phpBB/adm/style/install_error.html b/phpBB/adm/style/install_error.html old mode 100755 new mode 100644 diff --git a/phpBB/adm/style/install_footer.html b/phpBB/adm/style/install_footer.html old mode 100755 new mode 100644 diff --git a/phpBB/adm/style/install_header.html b/phpBB/adm/style/install_header.html old mode 100755 new mode 100644 diff --git a/phpBB/adm/style/install_install.html b/phpBB/adm/style/install_install.html old mode 100755 new mode 100644 diff --git a/phpBB/adm/style/install_main.html b/phpBB/adm/style/install_main.html old mode 100755 new mode 100644 diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index e883e66d80..6fd34ac678 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -181,11 +181,11 @@ function switch_menu()
-
+
- + @@ -1345,7 +1371,7 @@ if (function_exists('exit_handler')) /** * Function where all data changes are executed */ -function change_database_data($version) +function change_database_data(&$no_updates, $version) { global $db, $map_dbms, $errored, $error_ary, $config, $phpbb_root_path; @@ -1364,7 +1390,7 @@ function change_database_data($version) $smileys[$row['smiley_id']] = $row['code']; } $db->sql_freeresult($result); - + foreach ($smileys as $id => $code) { // 2.0 only entitized lt and gt; We need to do something about double quotes. @@ -1392,6 +1418,7 @@ function change_database_data($version) sql_create_index($map_dbms, 'ath_op_id', ACL_ROLES_DATA_TABLE, array('auth_option_id')); } + $no_updates = false; break; case '3.0.RC3': @@ -1481,6 +1508,7 @@ function change_database_data($version) set_config('allow_birthdays', '1'); set_config('cron_lock', '0', true); + $no_updates = false; break; case '3.0.RC4': @@ -1678,6 +1706,7 @@ function change_database_data($version) set_config('ldap_port', ''); set_config('ldap_user_filter', ''); + $no_updates = false; break; case '3.0.RC5': @@ -1699,7 +1728,7 @@ function change_database_data($version) $sql = 'SELECT forum_id, forum_password FROM ' . FORUMS_TABLE; $result = _sql($sql, $errored, $error_ary); - + while ($row = $db->sql_fetchrow($result)) { if (!empty($row['forum_password'])) @@ -1708,9 +1737,10 @@ function change_database_data($version) } } $db->sql_freeresult($result); - + $db->sql_transaction('commit'); + $no_updates = false; break; case '3.0.0': @@ -1719,7 +1749,7 @@ function change_database_data($version) SET topic_last_view_time = topic_last_post_time WHERE topic_last_view_time = 0"; _sql($sql, $errored, $error_ary); - + // Update smiley sizes $smileys = array('icon_e_surprised.gif', 'icon_eek.gif', 'icon_cool.gif', 'icon_lol.gif', 'icon_mad.gif', 'icon_razz.gif', 'icon_redface.gif', 'icon_cry.gif', 'icon_evil.gif', 'icon_twisted.gif', 'icon_rolleyes.gif', 'icon_exclaim.gif', 'icon_question.gif', 'icon_idea.gif', 'icon_arrow.gif', 'icon_neutral.gif', 'icon_mrgreen.gif', 'icon_e_ugeek.gif'); @@ -1728,18 +1758,27 @@ function change_database_data($version) if (file_exists($phpbb_root_path . 'images/smilies/' . $smiley)) { list($width, $height) = getimagesize($phpbb_root_path . 'images/smilies/' . $smiley); - + $sql = 'UPDATE ' . SMILIES_TABLE . ' SET smiley_width = ' . $width . ', smiley_height = ' . $height . " WHERE smiley_url = '" . $db->sql_escape($smiley) . "'"; - + _sql($sql, $errored, $error_ary); } } - - // TODO: remove all form token min times + $no_updates = false; break; + + case '3.0.1-RC1': + + set_config('referer_validation', '1'); + set_config('check_attachment_content', '1'); + set_config('mime_triggers', 'body|head|html|img|plaintext|a href|pre|script|table|title'); + + $no_updates = false; + break; + } } diff --git a/phpBB/install/index.php b/phpBB/install/index.php old mode 100755 new mode 100644 diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 081b1a6c31..25d8551df4 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -298,7 +298,7 @@ class install_convert extends module if (isset($convertor_data)) { $sort[strtolower($convertor_data['forum_name'])] = sizeof($convertors); - + $convertors[] = array( 'tag' => $m[1], 'forum_name' => $convertor_data['forum_name'], @@ -585,7 +585,7 @@ class install_convert extends module function convert_data($sub) { global $template, $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache; - global $convert, $convert_row, $message_parser, $skip_rows; + global $convert, $convert_row, $message_parser, $skip_rows, $language; require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); @@ -891,7 +891,7 @@ class install_convert extends module { $table = $convert->src_table_prefix . $m[1]; $tables_list[$table] = $table; - + if (!empty($m[3])) { $aliases[] = $convert->src_table_prefix . $m[3]; @@ -948,7 +948,7 @@ class install_convert extends module // Throw an error if some tables are missing // We used to do some guessing here, but since we have a suggestion of possible values earlier, I don't see it adding anything here to do it again - + if (sizeof($missing_tables) == sizeof($tables_list)) { $this->p_master->error($user->lang['NO_TABLES_FOUND'] . ' ' . $user->lang['CHECK_TABLE_PREFIX'], __LINE__, __FILE__); @@ -1299,7 +1299,7 @@ class install_convert extends module if ($errored) { $db->sql_return_on_error(true); - + // Because it errored out we will try to insert the rows one by one... most of the time this // is caused by duplicate entries - but we also do not want to miss one... foreach ($waiting_rows as $waiting_sql) @@ -1607,7 +1607,7 @@ class install_convert extends module 'TITLE' => $user->lang['UPDATE_TOPICS_POSTED'], 'RESULT' => $user->lang['DONE'], )); - + if ($db->sql_error_triggered) { $template->assign_vars(array( @@ -1617,7 +1617,7 @@ class install_convert extends module )); } $db->sql_return_on_error(false); - + $this->finish_conversion(); return; } @@ -1949,7 +1949,7 @@ class install_convert extends module $firstkey_set = false; $firstkey = 0; - + foreach ($fields[1] as $inner_key => $inner_value) { if (!$firstkey_set) @@ -1974,7 +1974,7 @@ class install_convert extends module { $sql_flag = true; } - + // No function assigned? if (empty($fields[2])) { diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php old mode 100755 new mode 100644 index f7d6d0a9c4..282afd5e23 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1021,6 +1021,12 @@ class install_install extends module // HTTP_HOST is having the correct browser url in most cases... $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME')); + // HTTP HOST can carry a port number... + if (strpos($server_name, ':') !== false) + { + $server_name = substr($server_name, 0, strpos($server_name, ':')); + } + $data['email_enable'] = ($data['email_enable'] !== '') ? $data['email_enable'] : true; $data['server_name'] = ($data['server_name'] !== '') ? $data['server_name'] : $server_name; $data['server_port'] = ($data['server_port'] !== '') ? $data['server_port'] : ((!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT')); @@ -1114,6 +1120,13 @@ class install_install extends module // HTTP_HOST is having the correct browser url in most cases... $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME')); + + // HTTP HOST can carry a port number... + if (strpos($server_name, ':') !== false) + { + $server_name = substr($server_name, 0, strpos($server_name, ':')); + } + $cookie_domain = ($data['server_name'] != '') ? $data['server_name'] : $server_name; // Try to come up with the best solution for cookie domain... diff --git a/phpBB/install/install_main.php b/phpBB/install/install_main.php old mode 100755 new mode 100644 diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 43ab04d77e..3dfe8ae0d9 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -64,6 +64,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_foreground_noise', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_x_grid', '25'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_y_grid', '25'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('check_attachment_content', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('check_dnsbl', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('chg_passforce', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain', ''); @@ -172,8 +173,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_urls', '5' INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_name_chars', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_pass_chars', '6'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_search_author_chars', '3'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_time_reg', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_time_terms', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('mime_triggers', 'body|head|html|img|plaintext|a href|pre|script|table|title'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('pass_complex', 'PASS_TYPE_ANY'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_edit_time', '0'); @@ -184,6 +184,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '600'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ranks_path', 'images/ranks'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('referer_validation', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_block_size', '250'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_gc', '7200'); @@ -213,7 +214,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.2-RC1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php index 6edae1a4cc..594eb9de33 100644 --- a/phpBB/language/en/acp/attachments.php +++ b/phpBB/language/en/acp/attachments.php @@ -71,6 +71,8 @@ $lang = array_merge($lang, array( 'CAT_QUICKTIME_FILES' => 'Quicktime media files', 'CAT_RM_FILES' => 'RealMedia media files', 'CAT_WM_FILES' => 'Windows Media media files', + 'CHECK_CONTENT' => 'Check attachment files', + 'CHECK_CONTENT_EXPLAIN' => 'Some browsers can be tricked to assume an incorrect mimetype for uploaded files. This option ensures that such files likely to cause this are rejected.', 'CREATE_GROUP' => 'Create new group', 'CREATE_THUMBNAIL' => 'Create thumbnail', 'CREATE_THUMBNAIL_EXPLAIN' => 'Create a thumbnail in all possible situations.', diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index f328c05882..ae122c54ee 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -206,10 +206,6 @@ $lang = array_merge($lang, array( 'ENABLE_COPPA_EXPLAIN' => 'This requires users to declare whether they are 13 or over for compliance with the U.S. COPPA. If this is disabled the COPPA specific groups will no longer be displayed.', 'MAX_CHARS' => 'Max', 'MIN_CHARS' => 'Min', - 'MIN_TIME_REG' => 'Minimum time for registration', - 'MIN_TIME_REG_EXPLAIN' => 'The registration form cannot be submitted before this time has passed.', - 'MIN_TIME_TERMS' => 'Minimum time for accepting terms', - 'MIN_TIME_TERMS_EXPLAIN' => 'The terms page cannot be skipped before this time has passed.', 'NO_AUTH_PLUGIN' => 'No suitable auth plugin found.', 'PASSWORD_LENGTH' => 'Password length', 'PASSWORD_LENGTH_EXPLAIN' => 'Minimum and maximum number of characters in passwords.', @@ -375,8 +371,6 @@ $lang = array_merge($lang, array( 'FORCE_PASS_CHANGE_EXPLAIN' => 'Require user to change their password after a set number of days. Setting this value to 0 disables this behaviour.', 'FORM_TIME_MAX' => 'Maximum time to submit forms', 'FORM_TIME_MAX_EXPLAIN' => 'The time a user has to submit a form. Use -1 to disable. Note that a form might become invalid if the session expires, regardless of this setting.', - 'FORM_TIME_MIN' => 'Minimum time to submit forms', - 'FORM_TIME_MIN_EXPLAIN' => 'Submissions faster than this time are ignored by the board. Use 0 to disable.', 'FORM_SID_GUESTS' => 'Tie forms to guest sessions', 'FORM_SID_GUESTS_EXPLAIN' => 'If enabled, the form token issued to guests will be session-exclusive. This can cause problems with some ISPs.', 'FORWARDED_FOR_VALID' => 'Validated X_FORWARDED_FOR header', @@ -386,12 +380,17 @@ $lang = array_merge($lang, array( 'MAX_LOGIN_ATTEMPTS' => 'Maximum number of login attempts', 'MAX_LOGIN_ATTEMPTS_EXPLAIN' => 'After this number of failed logins the user needs to additionally confirm his login visually (visual confirmation).', 'NO_IP_VALIDATION' => 'None', + 'NO_REF_VALIDATION' => 'None', 'PASSWORD_TYPE' => 'Password complexity', 'PASSWORD_TYPE_EXPLAIN' => 'Determines how complex a password needs to be when set or altered, subsequent options include the previous ones.', 'PASS_TYPE_ALPHA' => 'Must contain letters and numbers', 'PASS_TYPE_ANY' => 'No requirements', 'PASS_TYPE_CASE' => 'Must be mixed case', 'PASS_TYPE_SYMBOL' => 'Must contain symbols', + 'REF_HOST' => 'Only validate host', + 'REF_PATH' => 'Also validate path', + 'REFERER_VALID' => 'Validate Referer', + 'REFERER_VALID_EXPLAIN' => 'If enabled, the referer of POST requests will be checked against the host/script path settings. This may cause issues with boards using several domains and or external logins.', 'TPL_ALLOW_PHP' => 'Allow php in templates', 'TPL_ALLOW_PHP_EXPLAIN' => 'If this option is enabled, PHP and INCLUDEPHP statements will be recognised and parsed in templates.', )); diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index f380b1f570..9ed92bfcfb 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -201,6 +201,9 @@ $lang = array_merge($lang, array( 'ADMIN_INDEX' => 'Admin index', 'ADMIN_PANEL' => 'Administration Control Panel', + 'ADM_LOGOUT' => 'ACP Logout', + 'ADM_LOGGED_OUT' => 'Successfully logged out from Administration Control Panel', + 'BACK' => 'Back', 'COLOUR_SWATCH' => 'Web-safe colour swatch', @@ -608,6 +611,7 @@ $lang = array_merge($lang, array( 'LOG_REASON_REMOVED' => 'Removed report/denial reason
» %s', 'LOG_REASON_UPDATED' => 'Updated report/denial reason
» %s', + 'LOG_REFERER_INVALID' => 'Referer validation failed
»Referer was “%1$s”. The request was rejected and the session killed.', 'LOG_RESET_DATE' => 'Board start date reset', 'LOG_RESET_ONLINE' => 'Most users online reset', 'LOG_RESYNC_POSTCOUNTS' => 'User post counts resynchronised', diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php index 714cbe7f0d..f74110a7d3 100644 --- a/phpBB/language/en/acp/groups.php +++ b/phpBB/language/en/acp/groups.php @@ -108,6 +108,7 @@ $lang = array_merge($lang, array( 'NO_PERMISSIONS' => 'Do not copy permissions', 'NO_USERS' => 'You haven’t entered any users.', 'NO_USERS_ADDED' => 'No users were added to the group.', + 'NO_VALID_USERS' => 'You haven’t entered any users eligible for that action.', 'SPECIAL_GROUPS' => 'Pre-defined groups', 'SPECIAL_GROUPS_EXPLAIN' => 'Pre-defined groups are special groups, they cannot be deleted or directly modified. However you can still add users and alter basic settings.', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index db5f49339a..7739c63521 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -78,6 +78,7 @@ $lang = array_merge($lang, array( 'ATTACHED_IMAGE_NOT_IMAGE' => 'The image file you tried to attach is invalid.', 'AUTHOR' => 'Author', 'AUTH_NO_PROFILE_CREATED' => 'The creation of a user profile was unsuccessful.', + 'AVATAR_DISALLOWED_CONTENT' => 'The upload was rejected because the uploaded file was identified as a possible attack vector.', 'AVATAR_DISALLOWED_EXTENSION' => 'This file cannot be displayed because the extension %s is not allowed.', 'AVATAR_EMPTY_REMOTE_DATA' => 'The specified avatar could not be uploaded because the remote data appears to be invalid or corrupted.', 'AVATAR_EMPTY_FILEUPLOAD' => 'The uploaded avatar file is empty.', diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php old mode 100755 new mode 100644 diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php index ad4dd83ca4..b5b8434776 100644 --- a/phpBB/language/en/memberlist.php +++ b/phpBB/language/en/memberlist.php @@ -132,6 +132,7 @@ $lang = array_merge($lang, array( 'USERNAME_BEGINS_WITH' => 'Username begins with', 'USER_ADMIN' => 'Administrate user', + 'USER_BAN' => 'Banning', 'USER_FORUM' => 'User statistics', 'USER_ONLINE' => 'Online', 'USER_PRESENCE' => 'Board presence', diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index 76878c8f7c..f75837e96f 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -82,6 +82,7 @@ $lang = array_merge($lang, array( 'DISABLE_BBCODE' => 'Disable BBCode', 'DISABLE_MAGIC_URL' => 'Do not automatically parse URLs', 'DISABLE_SMILIES' => 'Disable smilies', + 'DISALLOWED_CONTENT' => 'The upload was rejected because the uploaded file was identified as a possible attack vector.', 'DISALLOWED_EXTENSION' => 'The extension %s is not allowed.', 'DRAFT_LOADED' => 'Draft loaded into posting area, you may want to finish your post now.
Your draft will be deleted after submitting this post.', 'DRAFT_LOADED_PM' => 'Draft loaded into message area, you may want to finish your private message now.
Your draft will be deleted after submitting this private message.', diff --git a/phpBB/mcp.php b/phpBB/mcp.php index cd6d20b19c..cb6c14ca0c 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -166,7 +166,7 @@ if ($quickmod) case 'delete_post': case 'delete_topic': $module->load('mcp', 'main', 'quickmod'); - exit_handler(); + exit; break; case 'topic_logs': @@ -390,7 +390,7 @@ function get_topic_data($topic_ids, $acl_list = false, $read_tracking = false) $sql = $db->sql_build_query('SELECT', $sql_array); $result = $db->sql_query($sql); - + while ($row = $db->sql_fetchrow($result)) { if (!$row['forum_id']) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index a4c6b18f8f..f33eac5bac 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -551,6 +551,8 @@ switch ($mode) 'S_CUSTOM_FIELDS' => (isset($profile_fields['row']) && sizeof($profile_fields['row'])) ? true : false, 'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=users&mode=overview&u=' . $user_id, true, $user->session_id) : '', + 'U_USER_BAN' => ($auth->acl_get('m_ban')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=ban&mode=user&u=' . $user_id, true, $user->session_id) : '', + 'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_id) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&u={$user_id}") : '', 'S_ZEBRA' => ($user->data['user_id'] != $user_id && $user->data['is_registered'] && $zebra_enabled) ? true : false, @@ -896,7 +898,7 @@ switch ($mode) } $sort_key_text['m'] = $user->lang['SORT_RANK']; - $sort_key_sql['m'] = 'u.user_rank DESC, u.user_posts'; + $sort_key_sql['m'] = 'u.user_rank'; $sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']); @@ -1156,6 +1158,12 @@ switch ($mode) $order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'); + // Unfortunately we must do this here for sorting by rank, else the sort order is applied wrongly + if ($sort_key == 'm') + { + $order_by .= ', u.user_posts DESC'; + } + // Count the users ... if ($sql_where) { @@ -1556,6 +1564,7 @@ function show_profile($data) 'A_USERNAME' => addslashes(get_username_string('username', $user_id, $username, $data['user_colour'])), + 'AVATAR_IMG' => get_user_avatar($data['user_avatar'], $data['user_avatar_type'], $data['user_avatar_width'], $data['user_avatar_height']), 'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')), 'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false, 'RANK_IMG' => $rank_img, diff --git a/phpBB/posting.php b/phpBB/posting.php index dfe7b348a7..1dd2244656 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -114,8 +114,7 @@ switch ($mode) else { upload_popup(); - garbage_collection(); - exit_handler(); + exit; } break; @@ -146,7 +145,7 @@ if (!$post_data) if ($mode == 'popup') { upload_popup($post_data['forum_style']); - exit_handler(); + exit; } $user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']); @@ -277,7 +276,7 @@ if ($mode == 'edit' && !$auth->acl_get('m_edit', $forum_id)) if ($mode == 'delete') { handle_post_delete($forum_id, $topic_id, $post_id, $post_data); - exit_handler(); + exit; } // Handle bump mode... @@ -998,8 +997,6 @@ if ($submit || $preview || $refresh) $data['topic_replies'] = $post_data['topic_replies']; } - unset($message_parser); - $redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message); $post_need_approval = (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? true : false; @@ -1155,7 +1152,6 @@ if (sizeof($post_data['poll_options']) && $post_data['poll_title']) $message_parser->decode_message(); $post_data['poll_options'] = explode("\n", $message_parser->message); } -unset($message_parser); // MAIN POSTING PAGE BEGINS HERE @@ -1405,6 +1401,9 @@ function upload_popup($forum_style = 0) ); $template->display('popup'); + + garbage_collection(); + exit_handler(); } /** diff --git a/phpBB/style.php b/phpBB/style.php index 9d38128356..cb2bcff115 100644 --- a/phpBB/style.php +++ b/phpBB/style.php @@ -20,7 +20,7 @@ error_reporting(E_ALL ^ E_NOTICE); require($phpbb_root_path . 'config.' . $phpEx); -if (!defined('PHPBB_INSTALLED') || empty($dbms) || !isset($dbhost) || !isset($dbpasswd) || empty($dbuser)) +if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type)) { exit; } @@ -57,11 +57,6 @@ if (strspn($sid, 'abcdefABCDEF0123456789') !== strlen($sid)) // server a little if ($id) { - if (empty($acm_type) || empty($dbms)) - { - die('Hacking attempt'); - } - // Include files require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx); require($phpbb_root_path . 'includes/cache.' . $phpEx); @@ -100,7 +95,7 @@ if ($id) $user = array('user_id' => ANONYMOUS); } - $sql = 'SELECT s.style_id, c.theme_data, c.theme_path, c.theme_name, c.theme_mtime, i.*, t.template_path + $sql = 'SELECT s.style_id, c.theme_id, c.theme_data, c.theme_path, c.theme_name, c.theme_mtime, i.*, t.template_path FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . ' i WHERE s.style_id = ' . $id . ' AND t.template_id = s.template_id @@ -198,7 +193,7 @@ if ($id) ); $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " - WHERE theme_id = $id"; + WHERE theme_id = {$theme['theme_id']}"; $db->sql_query($sql); $cache->destroy('sql', STYLES_THEME_TABLE); diff --git a/phpBB/styles/prosilver/imageset/icon_user_warn.gif b/phpBB/styles/prosilver/imageset/icon_user_warn.gif old mode 100755 new mode 100644 diff --git a/phpBB/styles/prosilver/imageset/imageset.cfg b/phpBB/styles/prosilver/imageset/imageset.cfg index 83b5cdb710..4635a8bcef 100644 --- a/phpBB/styles/prosilver/imageset/imageset.cfg +++ b/phpBB/styles/prosilver/imageset/imageset.cfg @@ -19,7 +19,7 @@ # General Information about this style name = prosilver copyright = © phpBB Group, 2007 -version = 3.0.0 +version = 3.0.2 # Images img_site_logo = site_logo.gif*52*139 diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg index f1ea67f7ce..988dee1650 100644 --- a/phpBB/styles/prosilver/style.cfg +++ b/phpBB/styles/prosilver/style.cfg @@ -19,4 +19,4 @@ # General Information about this style name = prosilver copyright = © phpBB Group, 2007 -version = 3.0.0 \ No newline at end of file +version = 3.0.2 \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_ban.html b/phpBB/styles/prosilver/template/mcp_ban.html index c803ba253f..460c95e2a1 100644 --- a/phpBB/styles/prosilver/template/mcp_ban.html +++ b/phpBB/styles/prosilver/template/mcp_ban.html @@ -44,7 +44,7 @@
-
+
{L_FIND_USERNAME}
diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html index e2f140667c..0af3032fcf 100644 --- a/phpBB/styles/prosilver/template/mcp_queue.html +++ b/phpBB/styles/prosilver/template/mcp_queue.html @@ -36,7 +36,7 @@ -
  • {L_DELETED_TOPIC}

  • +
  • {L_DELETED_TOPIC}

  • diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index 53f516b193..7df3eb6a91 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -19,6 +19,7 @@
    {USERNAME} [ {L_USER_ADMIN} ] + [ {L_USER_BAN} ] [ {L_USE_PERMISSIONS} ]
    diff --git a/phpBB/styles/prosilver/template/template.cfg b/phpBB/styles/prosilver/template/template.cfg index 1251dcdce2..dbf3a29077 100644 --- a/phpBB/styles/prosilver/template/template.cfg +++ b/phpBB/styles/prosilver/template/template.cfg @@ -19,7 +19,7 @@ # General Information about this template name = prosilver copyright = © phpBB Group, 2007 -version = 3.0.0 +version = 3.0.2 # Defining a different template bitfield template_bitfield = lNg= diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html index 9dd28a0956..b146619f75 100644 --- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html +++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html @@ -81,7 +81,7 @@
    - + {S_FORM_TOKEN}
    diff --git a/phpBB/styles/prosilver/template/ucp_pm_history.html b/phpBB/styles/prosilver/template/ucp_pm_history.html index cadb44e914..5f2994f145 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_history.html +++ b/phpBB/styles/prosilver/template/ucp_pm_history.html @@ -9,7 +9,7 @@
    -
    +
    • {L_QUOTE} {history_row.MESSAGE_AUTHOR}
    • @@ -19,7 +19,7 @@

      class="current">{history_row.SUBJECT}

      {history_row.MINI_POST_IMG} {L_SENT_AT}: {history_row.SENT_DATE}
      {L_MESSAGE_BY_AUTHOR} {history_row.MESSAGE_AUTHOR_FULL}

      -
      +
      {history_row.MESSAGE}
      diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index fc0b306a6c..a5327bd0d1 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -253,8 +253,8 @@ } .rtl ul.topiclist li.row dt a.subforum { - padding: 0 0 0 12px; - background-position: 100% 100%; + padding-right: 12px; + background-position: right; position: static; } diff --git a/phpBB/styles/prosilver/theme/theme.cfg b/phpBB/styles/prosilver/theme/theme.cfg index 19fb8517b2..070d356aa5 100644 --- a/phpBB/styles/prosilver/theme/theme.cfg +++ b/phpBB/styles/prosilver/theme/theme.cfg @@ -21,7 +21,7 @@ # General Information about this theme name = prosilver copyright = © phpBB Group, 2007 -version = 3.0.0 +version = 3.0.2 # Some configuration options diff --git a/phpBB/styles/subsilver2/imageset/imageset.cfg b/phpBB/styles/subsilver2/imageset/imageset.cfg index 44f44007d7..11800f5fb7 100644 --- a/phpBB/styles/subsilver2/imageset/imageset.cfg +++ b/phpBB/styles/subsilver2/imageset/imageset.cfg @@ -19,7 +19,7 @@ # General Information about this style name = subsilver2 copyright = © phpBB Group, 2003 -version = 3.0.0 +version = 3.0.2 # Images img_site_logo = site_logo.gif*94*170 diff --git a/phpBB/styles/subsilver2/style.cfg b/phpBB/styles/subsilver2/style.cfg index 7465d36673..6451ea13db 100644 --- a/phpBB/styles/subsilver2/style.cfg +++ b/phpBB/styles/subsilver2/style.cfg @@ -19,4 +19,4 @@ # General Information about this style name = subsilver2 copyright = © 2005 phpBB Group -version = 3.0.0 +version = 3.0.2 diff --git a/phpBB/styles/subsilver2/template/template.cfg b/phpBB/styles/subsilver2/template/template.cfg index c83a1d94ad..c1f549eac2 100644 --- a/phpBB/styles/subsilver2/template/template.cfg +++ b/phpBB/styles/subsilver2/template/template.cfg @@ -19,5 +19,5 @@ # General Information about this template name = subsilver2 copyright = © phpBB Group, 2003 -version = 3.0.0 +version = 3.0.2 diff --git a/phpBB/styles/subsilver2/theme/theme.cfg b/phpBB/styles/subsilver2/theme/theme.cfg index 648c5732a8..96a68258cb 100644 --- a/phpBB/styles/subsilver2/theme/theme.cfg +++ b/phpBB/styles/subsilver2/theme/theme.cfg @@ -21,7 +21,7 @@ # General Information about this theme name = subsilver2 copyright = © phpBB Group, 2003 -version = 3.0.0 +version = 3.0.2 # Some configuration options diff --git a/phpBB/ucp.php b/phpBB/ucp.php old mode 100755 new mode 100644 index 1d182a713a..2b236c29c5 --- a/phpBB/ucp.php +++ b/phpBB/ucp.php @@ -69,7 +69,7 @@ switch ($mode) case 'confirm': $module->load('ucp', 'confirm'); - exit_handler(); + exit; break; case 'login': @@ -93,7 +93,7 @@ switch ($mode) $message = ($user->data['user_id'] == ANONYMOUS) ? $user->lang['LOGOUT_REDIRECT'] : $user->lang['LOGOUT_FAILED']; } meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx")); - + $message = $message . '

      ' . sprintf($user->lang['RETURN_INDEX'], '', ' '); trigger_error($message); @@ -135,7 +135,7 @@ switch ($mode) break; case 'delete_cookies': - + // Delete Cookies with dynamic names (do NOT delete poll cookies) if (confirm_box(true)) { diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index daae349401..0fafefad1e 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -451,9 +451,16 @@ $s_watching_topic = array( 'is_watching' => false, ); -if ($config['email_enable'] && $config['allow_topic_notify'] && $user->data['is_registered']) +if (($config['email_enable'] || $config['jab_enable']) && $config['allow_topic_notify'] && $user->data['is_registered']) { watch_topic_forum('topic', $s_watching_topic, $user->data['user_id'], $forum_id, $topic_id, $topic_data['notify_status'], $start); + + // Reset forum notification if forum notify is set + if ($config['allow_forum_notify'] && $auth->acl_get('f_subscribe', $forum_id)) + { + $s_watching_forum = $s_watching_topic; + watch_topic_forum('forum', $s_watching_forum, $user->data['user_id'], $forum_id, 0); + } } // Bookmarks @@ -1003,7 +1010,6 @@ while ($row = $db->sql_fetchrow($result)) 'rank_image' => '', 'rank_image_src' => '', 'sig' => '', - 'posts' => '', 'profile' => '', 'pm' => '', 'email' => '', @@ -1066,7 +1072,7 @@ while ($row = $db->sql_fetchrow($result)) 'msn' => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=msnm&u=$poster_id") : '', 'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row['user_yim']) . '&.src=pg' : '', 'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=jabber&u=$poster_id") : '', - 'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&showresults=posts') : '', + 'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&sr=posts') : '', ); get_user_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);