diff options
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/acp/acp_profile.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_styles.php | 4 | ||||
| -rw-r--r-- | phpBB/includes/constants.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/functions.php | 12 | ||||
| -rw-r--r-- | phpBB/includes/functions_content.php | 5 | ||||
| -rw-r--r-- | phpBB/includes/functions_install.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_activate.php | 3 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 5 |
8 files changed, 20 insertions, 15 deletions
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 = '<img src="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=confirm&id=' . $confirm_id . '&type=' . CONFIRM_REG . $str) . '" alt="" title="" />'; |
