Merge commit 'release-3.0.0'

This commit is contained in:
Nils Adermann 2010-03-02 01:05:37 +01:00
commit 2ba97da524
22 changed files with 86 additions and 50 deletions

View file

@ -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();

View file

@ -119,7 +119,6 @@
<!-- ENDIF -->
</form>
<!-- INCLUDE overall_footer.html -->

View file

@ -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),

View file

@ -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),

View file

@ -53,6 +53,7 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ol style="list-style-type: lower-roman;">
<li><a href="#v30rc8">Changes since RC-8</a></li>
<li><a href="#v30rc7">Changes since RC-7</a></li>
<li><a href="#v30rc6">Changes since RC-6</a></li>
<li><a href="#v30rc5">Changes since RC-5</a></li>
@ -79,7 +80,16 @@
<div class="content">
<a name="v30rc7"></a><h3>1.i. Changes since 3.0.RC7</h3>
<a name="v30rc8"></a><h3>1.i. Changes since 3.0.RC8</h3>
<ul>
<li>[Fix] Cleaned usernames contain only single spaces, so &quot;a_name&quot; and &quot;a__name&quot; are treated as the same name (Bug #15634)</li>
<li>[Fix] Check &quot;able to disable word censor&quot; option while applying word censor on text (Bug #15974)</li>
<li>[Fix] Rollback changes on failed transaction if returning on sql error is set</li>
<li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
</ul>
<a name="v30rc7"></a><h3>1.ii. Changes since 3.0.RC7</h3>
<ul>
<li>[Fix] Fixed MSSQL related bug in the update system</li>
@ -114,7 +124,7 @@
<li>[Fix] No duplication of active topics (Bug #15474)</li>
</ul>
<a name="v30rc6"></a><h3>1.ii. Changes since 3.0.RC6</h3>
<a name="v30rc6"></a><h3>1.iii. Changes since 3.0.RC6</h3>
<ul>
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
@ -124,7 +134,7 @@
<li>[Fix] Able to request new password (Bug #14743)</li>
</ul>
<a name="v30rc5"></a><h3>1.iii. Changes since 3.0.RC5</h3>
<a name="v30rc5"></a><h3>1.iv. Changes since 3.0.RC5</h3>
<ul>
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
@ -187,7 +197,7 @@
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
</ul>
<a name="v30rc4"></a><h3>1.iv. Changes since 3.0.RC4</h3>
<a name="v30rc4"></a><h3>1.v. Changes since 3.0.RC4</h3>
<ul>
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
@ -238,7 +248,7 @@
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
</ul>
<a name="v30rc3"></a><h3>1.v. Changes since 3.0.RC3</h3>
<a name="v30rc3"></a><h3>1.vi. Changes since 3.0.RC3</h3>
<ul>
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
@ -347,7 +357,7 @@
</ul>
<a name="v30rc2"></a><h3>1.vi. Changes since 3.0.RC2</h3>
<a name="v30rc2"></a><h3>1.vii. Changes since 3.0.RC2</h3>
<ul>
<li>[Fix] Re-allow searching within the memberlist</li>
@ -393,7 +403,7 @@
</ul>
<a name="v30rc1"></a><h3>1.vii. Changes since 3.0.RC1</h3>
<a name="v30rc1"></a><h3>1.viii. Changes since 3.0.RC1</h3>
<ul>
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>

View file

@ -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':

View file

@ -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)
{

View file

@ -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)
@ -589,6 +593,11 @@ class dbal
trigger_error($message, E_USER_ERROR);
}
if ($this->transaction)
{
$this->sql_transaction('rollback');
}
return $error;
}

View file

@ -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

View file

@ -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);

View file

@ -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' => '<a href="http://www.phpbb.com/">phpBB Group</a>',
'dbms' => $dbms,

View file

@ -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();
<?php
garbage_collection();
if (function_exists('exit_handler'))
{
exit_handler();
@ -2765,6 +2781,8 @@ function utf8_new_clean_string($text)
// Other control characters
$text = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $text);
$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);

View file

@ -1232,7 +1232,7 @@ class install_update extends module
foreach ($this->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;
}

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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');

View file

@ -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',

View file

@ -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'];
}

View file

@ -28,4 +28,6 @@
</fieldset>
</form>
<!-- ELSE -->
<br />
<!-- ENDIF -->

View file

@ -14,7 +14,7 @@
<ol class="def-rules">
<!-- BEGIN rule -->
<li><div class="right-box"><input type="submit" name="delete_rule[{rule.RULE_ID}]" value="{L_DELETE_RULE}" class="button2" /></div><strong>{L_IF}</strong> {rule.CHECK} <em>{rule.RULE}</em> <!-- IF rule.STRING --><strong>{rule.STRING}</strong> | <!-- ENDIF -->{rule.ACTION}<!-- IF rule.FOLDER -->: {rule.FOLDER}<!-- ENDIF --></li>
<li><div class="right-box"><input type="submit" name="delete_rule[{rule.RULE_ID}]" value="{L_DELETE_RULE}" class="button2" /></div><strong>{L_IF}</strong> {rule.CHECK} <em>{rule.RULE}</em> <!-- IF rule.STRING --><strong>{rule.STRING}</strong> | <!-- ENDIF -->{rule.ACTION}<!-- IF rule.FOLDER -->: {rule.FOLDER}<!-- ENDIF --><div style="clear: both;"></div></li>
<!-- BEGINELSE -->
<li><strong>{L_NO_RULES_DEFINED}</strong></li>
<!-- END rule -->