diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index 364525e860..af1623146e 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -77,12 +77,14 @@
{L_ACP_SEARCH_INDEX_EXPLAIN}
- {L_CONTINUE} + {L_CONTINUE}{L_CONTINUE_EXPLAIN}
@@ -121,9 +121,9 @@ diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index c655a2245a..2477b4aea5 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -986,7 +986,7 @@ function get_schema_struct() 'forum_name' => array('STEXT_UNI', ''), 'forum_desc' => array('TEXT_UNI', ''), 'forum_desc_bitfield' => array('VCHAR:252', ''), - 'forum_desc_options' => array('UINT:11', 0), + 'forum_desc_options' => array('UINT:11', 7), 'forum_desc_uid' => array('VCHAR:5', ''), 'forum_link' => array('VCHAR_UNI', ''), 'forum_password' => array('VCHAR_UNI:40', ''), @@ -995,7 +995,7 @@ function get_schema_struct() 'forum_rules' => array('TEXT_UNI', ''), 'forum_rules_link' => array('VCHAR_UNI', ''), 'forum_rules_bitfield' => array('VCHAR:252', ''), - 'forum_rules_options' => array('UINT:11', 0), + 'forum_rules_options' => array('UINT:11', 7), 'forum_rules_uid' => array('VCHAR:5', ''), 'forum_topics_per_page' => array('TINT:4', 0), 'forum_type' => array('TINT:4', 0), @@ -1064,7 +1064,7 @@ function get_schema_struct() 'group_name' => array('VCHAR_CI', ''), 'group_desc' => array('TEXT_UNI', ''), 'group_desc_bitfield' => array('VCHAR:252', ''), - 'group_desc_options' => array('UINT:11', 0), + 'group_desc_options' => array('UINT:11', 7), 'group_desc_uid' => array('VCHAR:5', ''), 'group_display' => array('BOOL', 0), 'group_avatar' => array('VCHAR', ''), diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 9a819d97e1..042f5c4e48 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -99,11 +99,11 @@ class acp_forums 'forum_link_track' => request_var('forum_link_track', false), 'forum_desc' => request_var('forum_desc', '', true), 'forum_desc_uid' => '', - 'forum_desc_options' => 0, + 'forum_desc_options' => 7, 'forum_desc_bitfield' => '', 'forum_rules' => request_var('forum_rules', '', true), 'forum_rules_uid' => '', - 'forum_rules_options' => 0, + 'forum_rules_options' => 7, 'forum_rules_bitfield' => '', 'forum_rules_link' => request_var('forum_rules_link', ''), 'forum_image' => request_var('forum_image', ''), diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index 5fccc565da..600d596370 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -85,7 +85,7 @@ class acp_groups break; } - group_update_listing($group_id); + group_update_listings($group_id); trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&action=list&g=' . $group_id)); break; @@ -136,7 +136,7 @@ class acp_groups group_user_attributes('default', $group_id, $mark_ary, false, $group_row['group_name'], $group_row); } - group_update_listing($group_id); + group_update_listings($group_id); trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id)); } diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index b1331fa1ae..b0c12c7928 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -406,12 +406,19 @@ class acp_main $files_per_day = $total_files; } - $sql = 'SELECT COUNT(attach_id) AS total_orphan - FROM ' . ATTACHMENTS_TABLE . ' - WHERE is_orphan = 1'; - $result = $db->sql_query($sql); - $total_orphan = (int) $db->sql_fetchfield('total_orphan'); - $db->sql_freeresult($result); + if ($config['allow_attachments'] || $config['allow_pm_attach']) + { + $sql = 'SELECT COUNT(attach_id) AS total_orphan + FROM ' . ATTACHMENTS_TABLE . ' + WHERE is_orphan = 1'; + $result = $db->sql_query($sql); + $total_orphan = (int) $db->sql_fetchfield('total_orphan'); + $db->sql_freeresult($result); + } + else + { + $total_orphan = false; + } $dbsize = get_database_size(); $s_action_options = build_select(array('online' => 'RESET_ONLINE', 'date' => 'RESET_DATE', 'stats' => 'RESYNC_STATS', 'user' => 'RESYNC_POSTCOUNTS', 'db_track' => 'RESYNC_POST_MARKING')); @@ -430,6 +437,7 @@ class acp_main 'DBSIZE' => $dbsize, 'UPLOAD_DIR_SIZE' => $upload_dir_size, 'TOTAL_ORPHAN' => $total_orphan, + 'S_TOTAL_ORPHAN' => ($total_orphan === false) ? false : true, 'GZIP_COMPRESSION' => ($config['gzip_compress']) ? $user->lang['ON'] : $user->lang['OFF'], 'DATABASE_INFO' => $db->sql_server_info(), diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index d7a594eeeb..4fa041bfd1 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2236,8 +2236,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb { global $phpbb_root_path, $phpEx; - $uid = ''; - $bitfield = ''; + $uid = $bitfield = ''; if (!$text) { diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 217befd5fa..2c82fda5ed 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -1018,24 +1018,11 @@ function display_user_activity(&$userdata) global $auth, $template, $db, $user; global $phpbb_root_path, $phpEx; - // Init new auth class if user is different - if ($user->data['user_id'] != $userdata['user_id']) - { - $auth2 = new auth(); - $auth2->acl($userdata); - - $post_count_ary = $auth2->acl_getf('!f_postcount'); - } - else - { - $post_count_ary = $auth->acl_getf('!f_postcount'); - } - - $forum_read_ary = $auth->acl_getf('!f_read'); - $forum_ary = array(); // Do not include those forums the user is not having read access to... + $forum_read_ary = $auth->acl_getf('!f_read'); + foreach ($forum_read_ary as $forum_id => $not_allowed) { if ($not_allowed['f_read']) @@ -1044,40 +1031,27 @@ function display_user_activity(&$userdata) } } - // Now do not include those forums where the posts do not count... - foreach ($post_count_ary as $forum_id => $not_counted) - { - if ($not_counted['f_postcount']) - { - $forum_ary[] = (int) $forum_id; - } - } - $forum_ary = array_unique($forum_ary); - $post_count_sql = (sizeof($forum_ary)) ? 'AND ' . $db->sql_in_set('f.forum_id', $forum_ary, true) : ''; + $forum_sql = (sizeof($forum_ary)) ? 'AND ' . $db->sql_in_set('forum_id', $forum_ary, true) : ''; + + // Obtain active forum + $sql = 'SELECT forum_id, COUNT(post_id) AS num_posts + FROM ' . POSTS_TABLE . ' + WHERE poster_id = ' . $userdata['user_id'] . " + AND post_postcount = 1 + $forum_sql + GROUP BY forum_id"; // Firebird does not support ORDER BY on aliased columns // MySQL does not support ORDER BY on functions switch (SQL_LAYER) { case 'firebird': - $sql = 'SELECT f.forum_id, COUNT(p.post_id) AS num_posts - FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f - WHERE p.poster_id = ' . $userdata['user_id'] . " - AND f.forum_id = p.forum_id - $post_count_sql - GROUP BY f.forum_id - ORDER BY COUNT(p.post_id) DESC"; + $sql .= ' ORDER BY COUNT(post_id) DESC'; break; default: - $sql = 'SELECT f.forum_id, COUNT(p.post_id) AS num_posts - FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f - WHERE p.poster_id = ' . $userdata['user_id'] . " - AND f.forum_id = p.forum_id - $post_count_sql - GROUP BY f.forum_id - ORDER BY num_posts DESC"; + $sql .= ' ORDER BY num_posts DESC'; break; } @@ -1095,30 +1069,24 @@ function display_user_activity(&$userdata) $db->sql_freeresult($result); } + // Obtain active topic + $sql = 'SELECT topic_id, COUNT(post_id) AS num_posts + FROM ' . POSTS_TABLE . ' + WHERE poster_id = ' . $userdata['user_id'] . " + AND post_postcount = 1 + $forum_sql + GROUP BY topic_id"; + // Firebird does not support ORDER BY on aliased columns // MySQL does not support ORDER BY on functions switch (SQL_LAYER) { case 'firebird': - $sql = 'SELECT t.topic_id, COUNT(p.post_id) AS num_posts - FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f - WHERE p.poster_id = ' . $userdata['user_id'] . " - AND t.topic_id = p.topic_id - AND f.forum_id = t.forum_id - $post_count_sql - GROUP BY t.topic_id - ORDER BY COUNT(p.post_id) DESC"; + $sql .= ' ORDER BY COUNT(post_id) DESC'; break; default: - $sql = 'SELECT t.topic_id, COUNT(p.post_id) AS num_posts - FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f - WHERE p.poster_id = ' . $userdata['user_id'] . " - AND t.topic_id = p.topic_id - AND f.forum_id = t.forum_id - $post_count_sql - GROUP BY t.topic_id - ORDER BY num_posts DESC"; + $sql .= ' ORDER BY num_posts DESC'; break; } diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 8970b7865e..07701f27ac 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -156,6 +156,7 @@ function user_add($user_row, $cp_data = false) 'user_actkey' => '', 'user_ip' => '', 'user_regdate' => time(), + 'user_passchg' => time(), 'user_lastmark' => time(), 'user_lastvisit' => 0, @@ -255,6 +256,7 @@ function user_add($user_row, $cp_data = false) function user_delete($mode, $user_id, $post_username = false) { global $config, $db, $user, $auth; + global $phpbb_root_path, $phpEx; $db->sql_transaction('begin'); @@ -286,7 +288,6 @@ function user_delete($mode, $user_id, $post_username = false) if (!function_exists('delete_posts')) { - global $phpbb_root_path, $phpEx; include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); } diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 458eb44b40..9af770e240 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -1202,7 +1202,7 @@ class user extends session // Does the user need to change their password? If so, redirect to the // ucp profile reg_details page ... of course do not redirect if we're already in the ucp - if (!defined('IN_ADMIN') && $config['chg_passforce'] && $this->data['is_registered'] && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400)) + if (!defined('IN_ADMIN') && !defined('ADMIN_START') && $config['chg_passforce'] && $this->data['is_registered'] && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400)) { if (strpos($this->page['query_string'], 'mode=reg_details') === false && $this->page['page_name'] != "ucp.$phpEx") { diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 717064b936..17fc170d21 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -402,7 +402,7 @@ $lang = array_merge($lang, array( 'REG_USER_ONLINE' => 'There is %d registered user and ', 'REG_USER_TOTAL' => '%d registered, ', 'REMOVE' => 'Remove', - 'REMOVE_INSTALL' => 'Please delete, move or rename the install directory.', + 'REMOVE_INSTALL' => 'Please delete, move or rename the install directory before you use your forum. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.', 'REPLIES' => 'Replies', 'REPLY_WITH_QUOTE' => 'Reply with quote', 'REPLYING_GLOBAL_ANNOUNCE' => 'Replying to Global Announcement', diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 6ffb4d9a2b..57c6c12965 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -136,7 +136,7 @@ $lang = array_merge($lang, array( 'INITIAL_CONFIG' => 'Basic Configuration', 'INITIAL_CONFIG_EXPLAIN' => 'Now that install has determined your server can run phpBB you need to supply some specific information. If you do not know how to connect to your database please contact your hosting provider (in the first instance) or use the phpBB support forums. When entering data please ensure you check it thoroughly before continuing.', 'INSTALL_CONGRATS' => 'Congratulations', - 'INSTALL_CONGRATS_EXPLAIN' => 'You have now successfully installed phpBB 3.0. Clicking the button below will take you to your Administration Control Panel (ACP). Take some time to examine the options available to you. Remember that help is available online via the Userguide and the Beta support forum, see the %sREADME%s for further information.In order to proceed, you will need the following information to hand: