diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_bbcodes.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_board.php | 1 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_groups.php | 5 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 8 | ||||
-rw-r--r-- | phpBB/includes/constants.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 6 | ||||
-rw-r--r-- | phpBB/includes/functions_acp.php | 4 | ||||
-rw-r--r-- | phpBB/includes/functions_admin.php | 6 | ||||
-rw-r--r-- | phpBB/includes/functions_messenger.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_user.php | 23 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_front.php | 10 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_reports.php | 6 |
12 files changed, 43 insertions, 32 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index dab18289c7..f958ae93c7 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -373,7 +373,7 @@ class acp_bbcodes * * @event core.acp_bbcodes_display_form * @var string action Type of the action: modify|create - * @var string sql_ary The SQL array to get custom bbcode data + * @var array sql_ary The SQL array to get custom bbcode data * @var array template_data Array with form template data * @var string u_action The u_action link * @since 3.1.0-a3 diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 26663d2a62..9d65c48bed 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -415,6 +415,7 @@ class acp_board 'browser_check' => array('lang' => 'BROWSER_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'forwarded_for_check' => array('lang' => 'FORWARDED_FOR_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'referer_validation' => array('lang' => 'REFERRER_VALID', 'validate' => 'int:0:3','type' => 'custom', 'method' => 'select_ref_check', 'explain' => true), + 'remote_upload_verify' => array('lang' => 'UPLOAD_CERT_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'check_dnsbl' => array('lang' => 'CHECK_DNSBL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'email_check_mx' => array('lang' => 'EMAIL_CHECK_MX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,), diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index 1f965b334c..ba39a1a60c 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -930,11 +930,12 @@ class acp_groups // used for easy access to the data within a group $cached_group_data[$type][$row['group_id']] = $row; $cached_group_data[$type][$row['group_id']]['total_members'] = 0; + $cached_group_data[$type][$row['group_id']]['pending_members'] = 0; } $db->sql_freeresult($result); // How many people are in which group? - $sql = 'SELECT COUNT(ug.user_id) AS total_members, ug.group_id + $sql = 'SELECT COUNT(ug.user_id) AS total_members, SUM(ug.user_pending) AS pending_members, ug.group_id FROM ' . USER_GROUP_TABLE . ' ug WHERE ' . $db->sql_in_set('ug.group_id', array_keys($lookup)) . ' GROUP BY ug.group_id'; @@ -944,6 +945,7 @@ class acp_groups { $type = $lookup[$row['group_id']]; $cached_group_data[$type][$row['group_id']]['total_members'] = $row['total_members']; + $cached_group_data[$type][$row['group_id']]['pending_members'] = $row['pending_members']; } $db->sql_freeresult($result); @@ -972,6 +974,7 @@ class acp_groups 'GROUP_NAME' => $group_name, 'TOTAL_MEMBERS' => $row['total_members'], + 'PENDING_MEMBERS' => $row['pending_members'] )); } } diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 2bec4385c3..0ee6452ada 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1929,8 +1929,12 @@ class acp_users } } - // Replace "error" strings with their real, localised form - $error = $phpbb_avatar_manager->localize_errors($user, $error); + // Avatar manager is not initialized if avatars are disabled + if (isset($phpbb_avatar_manager)) + { + // Replace "error" strings with their real, localised form + $error = $phpbb_avatar_manager->localize_errors($user, $error); + } $avatar = phpbb_get_user_avatar($user_row, 'USER_AVATAR', true); diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 8056abef00..f2b56cc84b 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -28,7 +28,7 @@ if (!defined('IN_PHPBB')) */ // phpBB Version -@define('PHPBB_VERSION', '3.2.0-a3-dev'); +@define('PHPBB_VERSION', '3.2.0-b2-dev'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 38879caf5f..54ff51dda5 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3632,7 +3632,7 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum' * @var string item Restrict online users to a certain * session item, e.g. forum for * session_forum_id - * @var string sql_ary SQL query to obtain users online data + * @var array sql_ary SQL query array to obtain users online data * @since 3.1.4-RC1 * @changed 3.1.7-RC1 Change sql query into array and adjust var accordingly. Allows extension authors the ability to adjust the sql_ary. */ @@ -4146,6 +4146,8 @@ function page_header($page_title = '', $display_online_list = false, $item_id = } } + $user->update_session_infos(); + // Generate logged in/logged out status if ($user->data['user_id'] != ANONYMOUS) { @@ -4577,8 +4579,6 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler = return; } - $user->update_session_infos(); - phpbb_check_and_display_sql_report($request, $auth, $db); $template->assign_vars(array( diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index d710d984b7..dc43957933 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -55,6 +55,8 @@ function adm_page_header($page_title) return; } + $user->update_session_infos(); + // gzip_compression if ($config['gzip_compress']) { @@ -166,8 +168,6 @@ function adm_page_footer($copyright_html = true) return; } - $user->update_session_infos(); - phpbb_check_and_display_sql_report($request, $auth, $db); $template->assign_vars(array( diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 1c7e68d358..a0073ec158 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2791,9 +2791,9 @@ function get_database_size() { $version = $row['mysql_version']; - if (preg_match('#(3\.23|[45]\.)#', $version)) + if (preg_match('#(3\.23|[45]\.|10\.[0-9]\.[0-9]{1,2}-+Maria)#', $version)) { - $db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.#', $version)) ? "`{$db->get_db_name()}`" : $db->get_db_name(); + $db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.|10\.[0-9]\.[0-9]{1,2}-+Maria#', $version)) ? "`{$db->get_db_name()}`" : $db->get_db_name(); $sql = 'SHOW TABLE STATUS FROM ' . $db_name; @@ -2802,7 +2802,7 @@ function get_database_size() $database_size = 0; while ($row = $db->sql_fetchrow($result)) { - if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && ($row['Engine'] == 'MyISAM' || $row['Engine'] == 'InnoDB'))) + if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && ($row['Engine'] == 'MyISAM' || $row['Engine'] == 'InnoDB' || $row['Engine'] == 'Aria'))) { if ($table_prefix != '') { diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 0aee9dd3cf..b306b9aa79 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -1733,7 +1733,7 @@ function mail_encode($str, $eol = "\r\n") */ function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg) { - global $phpbb_root_path, $phpEx; + global $config, $phpbb_root_path, $phpEx; // We use the EOL character for the OS here because the PHP mail function does not correctly transform line endings. On Windows SMTP is used (SMTP is \r\n), on UNIX a command is used... // Reference: http://bugs.php.net/bug.php?id=15841 diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index e1c687551b..bbf00735af 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2764,7 +2764,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false, * * @return false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER' */ -function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false) +function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $log_action = true) { global $db, $auth, $config, $user, $phpbb_dispatcher, $phpbb_container, $phpbb_log; @@ -2899,16 +2899,19 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $vars = array('group_id', 'group_name', 'user_id_ary', 'username_ary'); extract($phpbb_dispatcher->trigger_event('core.group_delete_user_after', compact($vars))); - if (!$group_name) + if ($log_action) { - $group_name = get_group_name($group_id); - } + if (!$group_name) + { + $group_name = get_group_name($group_id); + } - $log = 'LOG_GROUP_REMOVE'; + $log = 'LOG_GROUP_REMOVE'; - if ($group_name) - { - $phpbb_log->add('admin', $user->data['user_id'], $user->ip, $log, false, array($group_name, implode(', ', $username_ary))); + if ($group_name) + { + $phpbb_log->add('admin', $user->data['user_id'], $user->ip, $log, false, array($group_name, implode(', ', $username_ary))); + } } group_update_listings($group_id); @@ -3555,8 +3558,8 @@ function remove_newly_registered($user_id, $user_data = false) } // We need to call group_user_del here, because this function makes sure everything is correctly changed. - // A downside for a call within the session handler is that the language is not set up yet - so no log entry - group_user_del($group_id, $user_id); + // Force function to not log the removal of users from newly registered users group + group_user_del($group_id, $user_id, false, false, false); // Set user_new to 0 to let this not be triggered again $sql = 'UPDATE ' . USERS_TABLE . ' diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index 432b26ad11..aeb716c1f9 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -54,8 +54,8 @@ function mcp_front_view($id, $mode, $action) * Allow altering the query to get the number of unapproved posts * * @event core.mcp_front_queue_unapproved_total_before - * @var int sql_ary Query to get the total number of unapproved posts - * @var array forum_list List of forums to look for unapproved posts + * @var array sql_ary Query array to get the total number of unapproved posts + * @var array forum_list List of forums to look for unapproved posts * @since 3.1.5-RC1 */ $vars = array('sql_ary', 'forum_list'); @@ -179,7 +179,7 @@ function mcp_front_view($id, $mode, $action) * Alter sql query to count the number of reported posts * * @event core.mcp_front_reports_count_query_before - * @var int sql The query string used to get the number of reports that exist + * @var string sql The query string used to get the number of reports that exist * @var array forum_list List of forums that contain the posts * @since 3.1.5-RC1 */ @@ -226,8 +226,8 @@ function mcp_front_view($id, $mode, $action) * Alter sql query to get latest reported posts * * @event core.mcp_front_reports_listing_query_before - * @var int sql_ary Associative array with the query to be executed - * @var array forum_list List of forums that contain the posts + * @var array sql_ary Associative array with the query to be executed + * @var array forum_list List of forums that contain the posts * @since 3.1.0-RC3 */ $vars = array('sql_ary', 'forum_list'); diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 48d0e8d890..3809ea2616 100644 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -96,7 +96,7 @@ class mcp_reports * * @event core.mcp_reports_report_details_query_before * @var array sql_ary The array in the format of the query builder with the query - * @var mixed forum_id The forum_id, the number in the f GET parameter + * @var int forum_id The forum_id, the number in the f GET parameter * @var int post_id The post_id of the report being viewed (if 0, it is meaningless) * @var int report_id The report_id of the report being viewed * @since 3.1.5-RC1 @@ -119,10 +119,10 @@ class mcp_reports * * @event core.mcp_reports_report_details_query_after * @var array sql_ary The array in the format of the query builder with the query that had been executted - * @var mixed forum_id The forum_id, the number in the f GET parameter + * @var int forum_id The forum_id, the number in the f GET parameter * @var int post_id The post_id of the report being viewed (if 0, it is meaningless) * @var int report_id The report_id of the report being viewed - * @var int report The query's resulting row. + * @var array report The query's resulting row. * @since 3.1.5-RC1 */ $vars = array( |