diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index 96ee629a4d..e69e83d041 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -77,8 +77,8 @@ $module->load_active(); adm_page_header($module->get_page_title()); $template->set_filenames(array( - 'body' => $module->get_tpl_name()) -); + 'body' => $module->get_tpl_name(), +)); adm_page_footer(); diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index dd1374fee4..a002ad19ac 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -216,7 +216,7 @@

{S_FORM_TOKEN} - + @@ -373,4 +373,4 @@ - + \ No newline at end of file diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html index 85b8acc393..acb6e46df1 100644 --- a/phpBB/adm/style/acp_ban.html +++ b/phpBB/adm/style/acp_ban.html @@ -119,7 +119,6 @@ - - + \ No newline at end of file diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index abfe9b33ca..9ee9a81299 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -1804,8 +1804,8 @@ function get_schema_struct() 'user_style' => array('USINT', 0), 'user_rank' => array('UINT', 0), 'user_colour' => array('VCHAR:6', ''), - 'user_new_privmsg' => array('TINT:4', 0), - 'user_unread_privmsg' => array('TINT:4', 0), + 'user_new_privmsg' => array('INT:4', 0), + 'user_unread_privmsg' => array('INT:4', 0), 'user_last_privmsg' => array('TIMESTAMP', 0), 'user_message_rules' => array('BOOL', 0), 'user_full_folder' => array('INT:11', -3), diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php index 5ad23b0f55..ea64a1a94f 100644 --- a/phpBB/develop/mysql_upgrader.php +++ b/phpBB/develop/mysql_upgrader.php @@ -1276,8 +1276,8 @@ function get_schema_struct() 'user_style' => array('USINT', 0), 'user_rank' => array('UINT', 0), 'user_colour' => array('VCHAR:6', ''), - 'user_new_privmsg' => array('TINT:4', 0), - 'user_unread_privmsg' => array('TINT:4', 0), + 'user_new_privmsg' => array('INT:4', 0), + 'user_unread_privmsg' => array('INT:4', 0), 'user_last_privmsg' => array('TIMESTAMP', 0), 'user_message_rules' => array('BOOL', 0), 'user_full_folder' => array('INT:11', -3), diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 340c83aff9..c602cfdcd2 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -53,6 +53,7 @@
  1. Changelog
      +
    1. Changes since RC-8
    2. Changes since RC-7
    3. Changes since RC-6
    4. Changes since RC-5
    5. @@ -79,7 +80,16 @@
      -

      1.i. Changes since 3.0.RC7

      +

      1.i. Changes since 3.0.RC8

      + +
        +
      • [Fix] Cleaned usernames contain only single spaces, so "a_name" and "a__name" are treated as the same name (Bug #15634)
      • +
      • [Fix] Check "able to disable word censor" option while applying word censor on text (Bug #15974)
      • +
      • [Fix] Rollback changes on failed transaction if returning on sql error is set
      • +
      • [Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)
      • +
      + +

      1.ii. Changes since 3.0.RC7

      • [Fix] Fixed MSSQL related bug in the update system
      • @@ -114,7 +124,7 @@
      • [Fix] No duplication of active topics (Bug #15474)
      -

      1.ii. Changes since 3.0.RC6

      +

      1.iii. Changes since 3.0.RC6

      • [Fix] Submitting language changes using acp_language (Bug #14736)
      • @@ -124,7 +134,7 @@
      • [Fix] Able to request new password (Bug #14743)
      -

      1.iii. Changes since 3.0.RC5

      +

      1.iv. Changes since 3.0.RC5

      • [Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.
      • @@ -187,7 +197,7 @@
      • [Sec] New password hashing mechanism for storing passwords (#i42)
      -

      1.iv. Changes since 3.0.RC4

      +

      1.v. Changes since 3.0.RC4

      • [Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)
      • @@ -238,7 +248,7 @@
      • [Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)
      -

      1.v. Changes since 3.0.RC3

      +

      1.vi. Changes since 3.0.RC3

      • [Fix] Fixing some subsilver2 and prosilver style issues
      • @@ -347,7 +357,7 @@
      -

      1.vi. Changes since 3.0.RC2

      +

      1.vii. Changes since 3.0.RC2

      • [Fix] Re-allow searching within the memberlist
      • @@ -393,7 +403,7 @@
      -

      1.vii. Changes since 3.0.RC1

      +

      1.viii. Changes since 3.0.RC1

      • [Fix] (X)HTML issues within the templates (Bug #11255, #11255)
      • diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php index 5740e8af9b..5683ae5dab 100755 --- a/phpBB/includes/acp/acp_inactive.php +++ b/phpBB/includes/acp/acp_inactive.php @@ -135,6 +135,8 @@ class acp_inactive { user_delete('retain', $user_id, $user_affected[$user_id]); } + + add_log('admin', 'LOG_INACTIVE_' . strtoupper($action), implode(', ', $user_affected)); } else { @@ -149,8 +151,6 @@ class acp_inactive } } - add_log('admin', 'LOG_INACTIVE_' . strtoupper($action), implode(', ', $user_affected)); - break; case 'remind': diff --git a/phpBB/includes/cache.php b/phpBB/includes/cache.php index 5198abdc3c..31b8b73e10 100644 --- a/phpBB/includes/cache.php +++ b/phpBB/includes/cache.php @@ -73,12 +73,7 @@ class cache extends acm */ function obtain_word_list() { - global $config, $user, $db; - - if (!$user->optionget('viewcensors') && $config['allow_nocensors']) - { - return array(); - } + global $db; if (($censors = $this->get('_word_censors')) === false) { diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php index ed6ba71fea..e37ccda0db 100644 --- a/phpBB/includes/db/dbal.php +++ b/phpBB/includes/db/dbal.php @@ -124,7 +124,11 @@ class dbal if ($this->transaction) { - $this->sql_transaction('commit'); + do + { + $this->sql_transaction('commit'); + } + while ($this->transaction); } foreach ($this->open_queries as $query_id) @@ -588,7 +592,12 @@ class dbal trigger_error($message, E_USER_ERROR); } - + + if ($this->transaction) + { + $this->sql_transaction('rollback'); + } + return $error; } diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 8620134311..bf00beb2e1 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2050,11 +2050,11 @@ function check_form_key($form_name, $timespan = false, $return_page = '', $trigg if ($timespan === false) { // we enforce a minimum value of half a minute here. - $timespan = max(30, $config['form_token_lifetime']); + $timespan = ($config['form_token_lifetime'] == -1) ? -1 : max(30, $config['form_token_lifetime']); } if ($minimum_time === false) { - $minimum_time = $config['form_token_mintime']; + $minimum_time = (int) $config['form_token_mintime']; } if (isset($_POST['creation_time']) && isset($_POST['form_token'])) @@ -2837,6 +2837,7 @@ function phpbb_checkdnsrr($host, $type = '') return NULL; } + // @exec('nslookup -retry=1 -timout=1 -type=' . escapeshellarg($type) . ' ' . escapeshellarg($host), $output); @exec('nslookup -type=' . escapeshellarg($type) . ' ' . escapeshellarg($host), $output); // If output is empty, the nslookup failed diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php index e7f144af51..b30f28aac9 100644 --- a/phpBB/includes/utf/utf_tools.php +++ b/phpBB/includes/utf/utf_tools.php @@ -1829,6 +1829,9 @@ function utf8_clean_string($text) // Other control characters $text = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $text); + // we need to reduce multiple spaces to a single one + $text = preg_replace('# {2,}#', ' ', $text); + // we can use trim here as all the other space characters should have been turned // into normal ASCII spaces by now return trim($text); diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index d4972c5a00..16b500d8d5 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -31,7 +31,7 @@ unset($dbpasswd); */ $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', - 'version' => '1.0.RC8', + 'version' => '1.0.0', 'phpbb_version' => '3.0.0', 'author' => 'phpBB Group', 'dbms' => $dbms, diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 0145c2746a..fc9ce65dac 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -8,7 +8,7 @@ * */ -$updates_to_version = '3.0.RC8'; +$updates_to_version = '3.0.0'; // Return if we "just include it" to find out for which version the database update is responsuble for if (defined('IN_PHPBB') && defined('IN_INSTALL')) @@ -463,6 +463,16 @@ $database_update_info = array( ), ), ), + // Changes from 3.0.RC8 to the next version + '3.0.RC8' => array( + // Change the following columns + 'change_columns' => array( + USERS_TABLE => array( + 'user_new_privmsg' => array('INT:4', 0), + 'user_unread_privmsg' => array('INT:4', 0), + ), + ), + ), ); // Determine mapping database type @@ -571,7 +581,7 @@ else // Checks/Operations that have to be completed prior to starting the update itself $exit = false; -if (version_compare($current_version, '3.0.RC4', '<=')) +if (version_compare($current_version, '3.0.RC8', '<=')) { // Define missing language entries... if (!isset($lang['CLEANING_USERNAMES'])) @@ -715,9 +725,13 @@ if (version_compare($current_version, '3.0.RC4', '<=')) // duplicates might be created. Since the column has to be unique such usernames // must not exist. We need identify them and let the admin decide what to do // about them. + // After RC8 this was changed again, but this time only usernames containing spaces + // are affected. + $sql_where = (version_compare($current_version, '3.0.RC4', '<=')) ? '' : "WHERE username_clean LIKE '% %'"; $sql = 'SELECT user_id, username, username_clean - FROM ' . USERS_TABLE . ' - ORDER BY user_id ASC'; + FROM ' . USERS_TABLE . " + $sql_where + ORDER BY user_id ASC"; $result = $db->sql_query($sql); $colliding_users = $found_names = array(); @@ -1635,6 +1649,8 @@ $cache->purge(); update_info['files'] as $index => $file) { - if (is_int($update_list['status']) && $index <= $update_list['status']) + if (is_int($update_list['status']) && $index < $update_list['status']) { continue; } diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index a4f617209b..0f20b1030a 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -917,8 +917,8 @@ CREATE TABLE phpbb_users ( user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_colour varbinary(6) DEFAULT '' NOT NULL, - user_new_privmsg tinyint(4) DEFAULT '0' NOT NULL, - user_unread_privmsg tinyint(4) DEFAULT '0' NOT NULL, + user_new_privmsg int(4) DEFAULT '0' NOT NULL, + user_unread_privmsg int(4) DEFAULT '0' NOT NULL, user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL, user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_full_folder int(11) DEFAULT '-3' NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 618b98b280..2d91b0259e 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -917,8 +917,8 @@ CREATE TABLE phpbb_users ( user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_colour varchar(6) DEFAULT '' NOT NULL, - user_new_privmsg tinyint(4) DEFAULT '0' NOT NULL, - user_unread_privmsg tinyint(4) DEFAULT '0' NOT NULL, + user_new_privmsg int(4) DEFAULT '0' NOT NULL, + user_unread_privmsg int(4) DEFAULT '0' NOT NULL, user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL, user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_full_folder int(11) DEFAULT '-3' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 34ebe22742..1f20c17583 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -1180,8 +1180,8 @@ CREATE TABLE phpbb_users ( user_style INT2 DEFAULT '0' NOT NULL CHECK (user_style >= 0), user_rank INT4 DEFAULT '0' NOT NULL CHECK (user_rank >= 0), user_colour varchar(6) DEFAULT '' NOT NULL, - user_new_privmsg INT2 DEFAULT '0' NOT NULL, - user_unread_privmsg INT2 DEFAULT '0' NOT NULL, + user_new_privmsg INT4 DEFAULT '0' NOT NULL, + user_unread_privmsg INT4 DEFAULT '0' NOT NULL, user_last_privmsg INT4 DEFAULT '0' NOT NULL CHECK (user_last_privmsg >= 0), user_message_rules INT2 DEFAULT '0' NOT NULL CHECK (user_message_rules >= 0), user_full_folder INT4 DEFAULT '-3' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 51e87629fe..254b067b55 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -213,7 +213,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.RC8'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.0'); 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/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 5e2d28b5bc..fa5884cc5b 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -887,8 +887,8 @@ CREATE TABLE phpbb_users ( user_style INTEGER UNSIGNED NOT NULL DEFAULT '0', user_rank INTEGER UNSIGNED NOT NULL DEFAULT '0', user_colour varchar(6) NOT NULL DEFAULT '', - user_new_privmsg tinyint(4) NOT NULL DEFAULT '0', - user_unread_privmsg tinyint(4) NOT NULL DEFAULT '0', + user_new_privmsg int(4) NOT NULL DEFAULT '0', + user_unread_privmsg int(4) NOT NULL DEFAULT '0', user_last_privmsg INTEGER UNSIGNED NOT NULL DEFAULT '0', user_message_rules INTEGER UNSIGNED NOT NULL DEFAULT '0', user_full_folder int(11) NOT NULL DEFAULT '-3', diff --git a/phpBB/posting.php b/phpBB/posting.php index 4bf60f03fe..1236361e18 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -520,7 +520,7 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ( } else { - if (!$subject || !utf_clean_string($subject)) + if (!$subject || !utf8_clean_string($subject)) { $error[] = $user->lang['EMPTY_SUBJECT']; } @@ -530,7 +530,6 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ( $error[] = $user->lang['TOO_FEW_CHARS']; } } - unset($subject, $message); } @@ -612,7 +611,7 @@ if ($submit || $preview || $refresh) if ($poll_delete && $mode == 'edit' && sizeof($post_data['poll_options']) && ((!$post_data['poll_last_vote'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id))) { - if ($submit && check_form_key('posting')) + if ($submit && check_form_key('posting')) { $sql = 'DELETE FROM ' . POLL_OPTIONS_TABLE . " WHERE topic_id = $topic_id"; @@ -764,7 +763,7 @@ if ($submit || $preview || $refresh) } // check form - if (!check_form_key('posting', false, '', false, 2)) + if (($submit || $preview) && !check_form_key('posting')) { $error[] = $user->lang['FORM_INVALID']; } diff --git a/phpBB/styles/prosilver/template/jumpbox.html b/phpBB/styles/prosilver/template/jumpbox.html index 95324bd161..3ba7c3666d 100644 --- a/phpBB/styles/prosilver/template/jumpbox.html +++ b/phpBB/styles/prosilver/template/jumpbox.html @@ -28,4 +28,6 @@ + +
        diff --git a/phpBB/styles/prosilver/template/ucp_pm_options.html b/phpBB/styles/prosilver/template/ucp_pm_options.html index cbb9054f4f..a8693ac9b9 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_options.html +++ b/phpBB/styles/prosilver/template/ucp_pm_options.html @@ -14,12 +14,12 @@
          -
        1. {L_IF} {rule.CHECK} {rule.RULE} {rule.STRING} | {rule.ACTION}: {rule.FOLDER}
        2. +
        3. {L_IF} {rule.CHECK} {rule.RULE} {rule.STRING} | {rule.ACTION}: {rule.FOLDER}
        4. {L_NO_RULES_DEFINED}
        - +

        {L_ADD_NEW_RULE}