Merge commit 'release-3.0.5'

This commit is contained in:
Nils Adermann 2010-03-02 01:05:40 +01:00
commit 4f9c3b8f5c
12 changed files with 44 additions and 35 deletions

View file

@ -96,7 +96,7 @@
<li>[Fix] Added missing read permission information for some phpbb_chmod() calls</li> <li>[Fix] Added missing read permission information for some phpbb_chmod() calls</li>
<li>[Fix] Correctly display future dates (Bug #38755)</li> <li>[Fix] Correctly display future dates (Bug #38755)</li>
<li>[Fix] Fix guest/bot session problems with apache authentication plugin (Bug #41085)</li> <li>[Fix] Fix guest/bot session problems with apache authentication plugin (Bug #41085)</li>
<li>[Fix] Whois now works reliably for RIRs other than APNIC and RIPE</li> <li>[Fix] Whois now works reliably for RIRs other than APNIC and RIPE. (Bug #40085)</li>
<li>[Fix] Correctly convert Niels' Birthday MOD to the date format used in phpBB3. (Bug #32895)</li> <li>[Fix] Correctly convert Niels' Birthday MOD to the date format used in phpBB3. (Bug #32895)</li>
<li>[Fix] Changed the success message when requesting a new password to be more accurate. (Bug #41405)</li> <li>[Fix] Changed the success message when requesting a new password to be more accurate. (Bug #41405)</li>
<li>[Fix] Add missing anti-abuse email headers to acp_inactive.php and ucp_resend.php.</li> <li>[Fix] Add missing anti-abuse email headers to acp_inactive.php and ucp_resend.php.</li>
@ -153,6 +153,8 @@
<li>[Fix] Correct calculation of source/target forum statistics if mass moving topics with global announcements (Bug #44545)</li> <li>[Fix] Correct calculation of source/target forum statistics if mass moving topics with global announcements (Bug #44545)</li>
<li>[Fix] Fix column handling in db updater, custom profile fields an db tools for firebird DBMS (Bug #44555)</li> <li>[Fix] Fix column handling in db updater, custom profile fields an db tools for firebird DBMS (Bug #44555)</li>
<li>[Fix] IE8 textarea issues (Bug #43305)</li> <li>[Fix] IE8 textarea issues (Bug #43305)</li>
<li>[Fix] Prevent accounts from being activated by users when admin activation is turned on and the correct activation key is known.</li>
<li>[Fix] Allow the installer to operate under PHP 5.3. (Bug #45255)</li>
<li>[Change] Default difference view is now 'inline' instead of 'side by side'</li> <li>[Change] Default difference view is now 'inline' instead of 'side by side'</li>
<li>[Change] Added new option for merging differences to conflicting files in automatic updater</li> <li>[Change] Added new option for merging differences to conflicting files in automatic updater</li>
<li>[Change] Add link to user profile in the MCP for user notes and warn user.</li> <li>[Change] Add link to user profile in the MCP for user notes and warn user.</li>
@ -168,7 +170,6 @@
<li>[Feature] db_tools now support create table and drop table.</li> <li>[Feature] db_tools now support create table and drop table.</li>
<li>[Feature] Database updater checks for incompatible db schema (MySQL 3.x/4.x against MySQL 4.1.x/5.x/6.x)</li> <li>[Feature] Database updater checks for incompatible db schema (MySQL 3.x/4.x against MySQL 4.1.x/5.x/6.x)</li>
<li>[Feature] New search option: Maximum number of words allowed to search for.</li> <li>[Feature] New search option: Maximum number of words allowed to search for.</li>
<li>[Sec] Prevent accounts from being activated by users when admin activation is turned on and the correct activation key is known.</li>
<li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li> <li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li>
</ul> </ul>

View file

@ -922,7 +922,7 @@ class acp_profile
case FIELD_TEXT: case FIELD_TEXT:
case FIELD_STRING: case FIELD_STRING:
if ($cp->vars['lang_default_value']) if (strlen($cp->vars['lang_default_value']))
{ {
$options['lang_default_value'] = ($field_type == FIELD_STRING) ? 'string' : 'text'; $options['lang_default_value'] = ($field_type == FIELD_STRING) ? 'string' : 'text';
} }

View file

@ -3221,7 +3221,7 @@ parse_css_file = {PARSE_CSS_FILE}
{ {
if ($mode === 'template') if ($mode === 'template')
{ {
$select_bf = ', template_bitfield'; $select_bf = ', bbcode_bitfield';
} }
else else
{ {
@ -3243,7 +3243,7 @@ parse_css_file = {PARSE_CSS_FILE}
{ {
$inherit_id = $row["{$mode}_id"]; $inherit_id = $row["{$mode}_id"];
$inherit_path = $row["{$mode}_path"]; $inherit_path = $row["{$mode}_path"];
$inherit_bf = ($mode === 'template') ? $row["{$mode}_bitfield"] : false; $inherit_bf = ($mode === 'template') ? $row["bbcode_bitfield"] : false;
$cfg_data['store_db'] = $row["{$mode}_storedb"]; $cfg_data['store_db'] = $row["{$mode}_storedb"];
$store_db = $row["{$mode}_storedb"]; $store_db = $row["{$mode}_storedb"];
} }

View file

@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
*/ */
// phpBB Version // phpBB Version
define('PHPBB_VERSION', '3.0.5-RC1'); define('PHPBB_VERSION', '3.0.5');
// QA-related // QA-related
// define('PHPBB_QA', 1); // define('PHPBB_QA', 1);

View file

@ -541,8 +541,8 @@ function phpbb_chmod($filename, $perms = CHMOD_READ)
global $phpbb_root_path, $phpEx; global $phpbb_root_path, $phpEx;
// Determine owner/group of common.php file and the filename we want to change here // Determine owner/group of common.php file and the filename we want to change here
$common_php_owner = fileowner($phpbb_root_path . 'common.' . $phpEx); $common_php_owner = @fileowner($phpbb_root_path . 'common.' . $phpEx);
$common_php_group = filegroup($phpbb_root_path . 'common.' . $phpEx); $common_php_group = @filegroup($phpbb_root_path . 'common.' . $phpEx);
// And the owner and the groups PHP is running under. // And the owner and the groups PHP is running under.
$php_uid = (function_exists('posix_getuid')) ? @posix_getuid() : false; $php_uid = (function_exists('posix_getuid')) ? @posix_getuid() : false;
@ -568,21 +568,21 @@ function phpbb_chmod($filename, $perms = CHMOD_READ)
if ($_chmod_info['process']) if ($_chmod_info['process'])
{ {
$file_uid = fileowner($filename); $file_uid = @fileowner($filename);
$file_gid = filegroup($filename); $file_gid = @filegroup($filename);
// Change owner // Change owner
if (@chown($filename, $_chmod_info['common_owner'])) if (@chown($filename, $_chmod_info['common_owner']))
{ {
clearstatcache(); clearstatcache();
$file_uid = fileowner($filename); $file_uid = @fileowner($filename);
} }
// Change group // Change group
if (@chgrp($filename, $_chmod_info['common_group'])) if (@chgrp($filename, $_chmod_info['common_group']))
{ {
clearstatcache(); clearstatcache();
$file_gid = filegroup($filename); $file_gid = @filegroup($filename);
} }
// If the file_uid/gid now match the one from common.php we can process further, else we are not able to change something // If the file_uid/gid now match the one from common.php we can process further, else we are not able to change something

View file

@ -261,6 +261,11 @@ function get_context($text, $words, $length = 400)
{ {
if (preg_match('#(?:[^\w]|^)(' . $word . ')(?:[^\w]|$)#i', $text, $match)) if (preg_match('#(?:[^\w]|^)(' . $word . ')(?:[^\w]|$)#i', $text, $match))
{ {
if (empty($match[1]))
{
continue;
}
$pos = utf8_strpos($text, $match[1]); $pos = utf8_strpos($text, $match[1]);
if ($pos !== false) if ($pos !== false)
{ {

View file

@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
*/ */
function can_load_dll($dll) function can_load_dll($dll)
{ {
return ((@ini_get('enable_dl') || strtolower(@ini_get('enable_dl')) == 'on') && (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') && @dl($dll . '.' . PHP_SHLIB_SUFFIX)) ? true : false; return ((@ini_get('enable_dl') || strtolower(@ini_get('enable_dl')) == 'on') && (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') && function_exists('dl') && @dl($dll . '.' . PHP_SHLIB_SUFFIX)) ? true : false;
} }
/** /**

View file

@ -58,7 +58,8 @@ class ucp_activate
// Do not allow activating by non administrators when admin activation is on // Do not allow activating by non administrators when admin activation is on
// Only activation type the user should be able to do is INACTIVE_REMIND // Only activation type the user should be able to do is INACTIVE_REMIND
if ($user_row['user_inactive_reason'] != INACTIVE_REMIND && $config['require_activation'] == USER_ACTIVATION_ADMIN && !$auth->acl_get('a_user')) // or activate a new password which is not an activation state :@
if (!$user_row['user_newpasswd'] && $user_row['user_inactive_reason'] != INACTIVE_REMIND && $config['require_activation'] == USER_ACTIVATION_ADMIN && !$auth->acl_get('a_user'))
{ {
if (!$user->data['is_registered']) if (!$user->data['is_registered'])
{ {

View file

@ -511,12 +511,11 @@ class ucp_register
$sql = 'UPDATE ' . CONFIRM_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array( $sql = 'UPDATE ' . CONFIRM_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
'confirm_type' => (int) CONFIRM_REG, 'confirm_type' => (int) CONFIRM_REG,
'code' => (string) $code, 'code' => (string) $code,
'seed' => (int) $seed) . " 'seed' => (int) $seed)) . "
WHERE WHERE
confirm_id = '" . $db->sql_escape($confirm_id) . "' AND confirm_id = '" . $db->sql_escape($confirm_id) . "' AND
session_id = '" . $db->sql_escape($session_id) . "' AND session_id = '" . $db->sql_escape($session_id) . "' AND
confirm_type = " . (int) CONFIRM_REG confirm_type = " . (int) CONFIRM_REG;
);
$db->sql_query($sql); $db->sql_query($sql);
} }
$confirm_image = '<img src="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=confirm&amp;id=' . $confirm_id . '&amp;type=' . CONFIRM_REG . $str) . '" alt="" title="" />'; $confirm_image = '<img src="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=confirm&amp;id=' . $confirm_id . '&amp;type=' . CONFIRM_REG . $str) . '" alt="" title="" />';

View file

@ -8,7 +8,7 @@
* *
*/ */
$updates_to_version = '3.0.5-RC1'; $updates_to_version = '3.0.5';
// Enter any version to update from to test updates. The version within the db will not be updated. // Enter any version to update from to test updates. The version within the db will not be updated.
$debug_from_version = false; $debug_from_version = false;
@ -674,6 +674,9 @@ function database_update_info()
), ),
), ),
), ),
// No changes from 3.0.5-RC1 to 3.0.5
'3.0.5-RC1' => array(),
); );
} }
@ -943,7 +946,7 @@ function change_database_data(&$no_updates, $version)
$sql = 'SELECT auth_option $sql = 'SELECT auth_option
FROM ' . ACL_OPTIONS_TABLE . ' FROM ' . ACL_OPTIONS_TABLE . '
GROUP BY auth_option GROUP BY auth_option
HAVING COUNT(*) >= 1'; HAVING COUNT(*) >= 2';
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$auth_options = array(); $auth_options = array();
@ -1005,6 +1008,10 @@ function change_database_data(&$no_updates, $version)
$no_updates = false; $no_updates = false;
break; break;
// No changes from 3.0.5-RC1 to 3.0.5
case '3.0.5-RC1':
break;
} }
} }

View file

@ -60,6 +60,8 @@ class install_update extends module
var $current_version; var $current_version;
var $unequal_version; var $unequal_version;
var $update_to_version;
// Set to false // Set to false
var $test_update = false; var $test_update = false;
@ -183,6 +185,9 @@ class install_update extends module
); );
} }
// We store the "update to" version, because it is not always the latest. ;)
$this->update_to_version = $this->update_info['version']['to'];
// Fill DB version // Fill DB version
if (empty($config['dbms_version'])) if (empty($config['dbms_version']))
{ {
@ -449,12 +454,12 @@ class install_update extends module
if ($all_up_to_date) if ($all_up_to_date)
{ {
// Add database update to log // Add database update to log
add_log('admin', 'LOG_UPDATE_PHPBB', $this->current_version, $this->latest_version); add_log('admin', 'LOG_UPDATE_PHPBB', $this->current_version, $this->update_to_version);
// Refresh prosilver css data - this may cause some unhappy users, but // Refresh prosilver css data - this may cause some unhappy users, but
$sql = 'SELECT * $sql = 'SELECT *
FROM ' . STYLES_THEME_TABLE . " FROM ' . STYLES_THEME_TABLE . "
WHERE theme_name = 'prosilver'"; WHERE LOWER(theme_name) = 'prosilver'";
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$theme = $db->sql_fetchrow($result); $theme = $db->sql_fetchrow($result);
$db->sql_freeresult($result); $db->sql_freeresult($result);
@ -491,22 +496,13 @@ class install_update extends module
if ($recache) if ($recache)
{ {
include_once($phpbb_root_path . 'includes/acp/acp_styles.' . $phpEx); // Instead of re-caching here, we simply remove theme_data... HAR HAR HAR (think about a carribean pirate)
$sql = 'UPDATE ' . STYLES_THEME_TABLE . " SET theme_data = ''
$theme['theme_data'] = acp_styles::db_theme_data($theme); WHERE theme_id = " . $theme['theme_id'];
$theme['theme_mtime'] = $update_time;
// Save CSS contents
$sql_ary = array(
'theme_mtime' => $theme['theme_mtime'],
'theme_data' => $theme['theme_data']
);
$sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE theme_id = ' . $theme['theme_id'];
$db->sql_query($sql); $db->sql_query($sql);
$cache->destroy('sql', STYLES_THEME_TABLE); $cache->destroy('sql', STYLES_THEME_TABLE);
$cache->destroy('sql', STYLES_TABLE);
} }
} }

View file

@ -222,7 +222,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 ('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_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 ('upload_path', 'files');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.5-RC1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.5');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); 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'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');