diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 396c64b3c0..60a0b9ddfc 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -96,7 +96,7 @@
[Fix] Added missing read permission information for some phpbb_chmod() calls
[Fix] Correctly display future dates (Bug #38755)
[Fix] Fix guest/bot session problems with apache authentication plugin (Bug #41085)
- [Fix] Whois now works reliably for RIRs other than APNIC and RIPE
+ [Fix] Whois now works reliably for RIRs other than APNIC and RIPE. (Bug #40085)
[Fix] Correctly convert Niels' Birthday MOD to the date format used in phpBB3. (Bug #32895)
[Fix] Changed the success message when requesting a new password to be more accurate. (Bug #41405)
[Fix] Add missing anti-abuse email headers to acp_inactive.php and ucp_resend.php.
@@ -153,6 +153,8 @@
[Fix] Correct calculation of source/target forum statistics if mass moving topics with global announcements (Bug #44545)
[Fix] Fix column handling in db updater, custom profile fields an db tools for firebird DBMS (Bug #44555)
[Fix] IE8 textarea issues (Bug #43305)
+ [Fix] Prevent accounts from being activated by users when admin activation is turned on and the correct activation key is known.
+ [Fix] Allow the installer to operate under PHP 5.3. (Bug #45255)
[Change] Default difference view is now 'inline' instead of 'side by side'
[Change] Added new option for merging differences to conflicting files in automatic updater
[Change] Add link to user profile in the MCP for user notes and warn user.
@@ -168,7 +170,6 @@
[Feature] db_tools now support create table and drop table.
[Feature] Database updater checks for incompatible db schema (MySQL 3.x/4.x against MySQL 4.1.x/5.x/6.x)
[Feature] New search option: Maximum number of words allowed to search for.
- [Sec] Prevent accounts from being activated by users when admin activation is turned on and the correct activation key is known.
[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 2b5ec88e5b..bbe36af9be 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -922,7 +922,7 @@ class acp_profile
case FIELD_TEXT:
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';
}
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 184b71cec3..184c40f218 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -3221,7 +3221,7 @@ parse_css_file = {PARSE_CSS_FILE}
{
if ($mode === 'template')
{
- $select_bf = ', template_bitfield';
+ $select_bf = ', bbcode_bitfield';
}
else
{
@@ -3243,7 +3243,7 @@ parse_css_file = {PARSE_CSS_FILE}
{
$inherit_id = $row["{$mode}_id"];
$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"];
$store_db = $row["{$mode}_storedb"];
}
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index ff0e46974f..4cb21bc637 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
-define('PHPBB_VERSION', '3.0.5-RC1');
+define('PHPBB_VERSION', '3.0.5');
// QA-related
// define('PHPBB_QA', 1);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index be5e661d44..476565452c 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -541,8 +541,8 @@ function phpbb_chmod($filename, $perms = CHMOD_READ)
global $phpbb_root_path, $phpEx;
// 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_group = filegroup($phpbb_root_path . 'common.' . $phpEx);
+ $common_php_owner = @fileowner($phpbb_root_path . 'common.' . $phpEx);
+ $common_php_group = @filegroup($phpbb_root_path . 'common.' . $phpEx);
// And the owner and the groups PHP is running under.
$php_uid = (function_exists('posix_getuid')) ? @posix_getuid() : false;
@@ -568,21 +568,21 @@ function phpbb_chmod($filename, $perms = CHMOD_READ)
if ($_chmod_info['process'])
{
- $file_uid = fileowner($filename);
- $file_gid = filegroup($filename);
+ $file_uid = @fileowner($filename);
+ $file_gid = @filegroup($filename);
// Change owner
if (@chown($filename, $_chmod_info['common_owner']))
{
clearstatcache();
- $file_uid = fileowner($filename);
+ $file_uid = @fileowner($filename);
}
// Change group
if (@chgrp($filename, $_chmod_info['common_group']))
{
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
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index 23cbff7e8f..3107177137 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -261,6 +261,11 @@ function get_context($text, $words, $length = 400)
{
if (preg_match('#(?:[^\w]|^)(' . $word . ')(?:[^\w]|$)#i', $text, $match))
{
+ if (empty($match[1]))
+ {
+ continue;
+ }
+
$pos = utf8_strpos($text, $match[1]);
if ($pos !== false)
{
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
index 90459813f1..611b0a7bc3 100644
--- a/phpBB/includes/functions_install.php
+++ b/phpBB/includes/functions_install.php
@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
*/
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;
}
/**
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php
index 36ab8a0e9b..8debaabf31 100644
--- a/phpBB/includes/ucp/ucp_activate.php
+++ b/phpBB/includes/ucp/ucp_activate.php
@@ -58,7 +58,8 @@ class ucp_activate
// 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
- 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'])
{
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 549f96c42d..e42ad8369d 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -511,12 +511,11 @@ class ucp_register
$sql = 'UPDATE ' . CONFIRM_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
'confirm_type' => (int) CONFIRM_REG,
'code' => (string) $code,
- 'seed' => (int) $seed) . "
+ 'seed' => (int) $seed)) . "
WHERE
confirm_id = '" . $db->sql_escape($confirm_id) . "' AND
session_id = '" . $db->sql_escape($session_id) . "' AND
- confirm_type = " . (int) CONFIRM_REG
- );
+ confirm_type = " . (int) CONFIRM_REG;
$db->sql_query($sql);
}
$confirm_image = '
';
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index ee28799694..c66ac859cf 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -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.
$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
FROM ' . ACL_OPTIONS_TABLE . '
GROUP BY auth_option
- HAVING COUNT(*) >= 1';
+ HAVING COUNT(*) >= 2';
$result = $db->sql_query($sql);
$auth_options = array();
@@ -1005,6 +1008,10 @@ function change_database_data(&$no_updates, $version)
$no_updates = false;
break;
+
+ // No changes from 3.0.5-RC1 to 3.0.5
+ case '3.0.5-RC1':
+ break;
}
}
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index ea87847fa2..388e217133 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -60,6 +60,8 @@ class install_update extends module
var $current_version;
var $unequal_version;
+ var $update_to_version;
+
// Set to 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
if (empty($config['dbms_version']))
{
@@ -449,12 +454,12 @@ class install_update extends module
if ($all_up_to_date)
{
// 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
$sql = 'SELECT *
FROM ' . STYLES_THEME_TABLE . "
- WHERE theme_name = 'prosilver'";
+ WHERE LOWER(theme_name) = 'prosilver'";
$result = $db->sql_query($sql);
$theme = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -491,22 +496,13 @@ class install_update extends module
if ($recache)
{
- include_once($phpbb_root_path . 'includes/acp/acp_styles.' . $phpEx);
-
- $theme['theme_data'] = acp_styles::db_theme_data($theme);
- $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'];
+ // 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 = ''
+ WHERE theme_id = " . $theme['theme_id'];
$db->sql_query($sql);
$cache->destroy('sql', STYLES_THEME_TABLE);
+ $cache->destroy('sql', STYLES_TABLE);
}
}
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 6deebd9005..8b6c6d7189 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -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 ('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.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_gc', '14400');