diff options
| author | Nils Adermann <naderman@naderman.de> | 2007-02-08 22:11:14 +0000 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2007-02-08 22:11:14 +0000 |
| commit | 56a93bdfdddde618fe826c23c9151086f9540860 (patch) | |
| tree | 5badf493ac976a48e8de22411610affa6019e6b3 /phpBB/includes/acp/acp_main.php | |
| parent | 766e311ff35b486a2f01b1cb2cf4fef3df290825 (diff) | |
| download | forums-56a93bdfdddde618fe826c23c9151086f9540860.tar forums-56a93bdfdddde618fe826c23c9151086f9540860.tar.gz forums-56a93bdfdddde618fe826c23c9151086f9540860.tar.bz2 forums-56a93bdfdddde618fe826c23c9151086f9540860.tar.xz forums-56a93bdfdddde618fe826c23c9151086f9540860.zip | |
- Pruning doesn't lower user post counts anymore [Bug #7676]
- Better resync explanations in ACP
- relative link to board shouldn't result in an empty link [Bug #7762]
- allow spaces to define multiple classes [Bug #7700]
- forgot addslashes for password conversion [Bug #7530]
- adjusted get_post_data call in mcp_post to retrieve read tracking info [Bug #7538]
- fixed sorting in reports/queue by properly generating the pagination links [Bug #7666]
- send UTF-8 charset header in database_update.php [Bug #7564]
git-svn-id: file:///svn/phpbb/trunk@6974 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_main.php')
| -rw-r--r-- | phpBB/includes/acp/acp_main.php | 55 |
1 files changed, 44 insertions, 11 deletions
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index bf958ba319..14f6571177 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -51,6 +51,46 @@ class acp_main $action = request_var('action', ''); + if ($action && !confirm_box(true)) + { + switch ($action) + { + case 'online': + $confirm = true; + $confirm_lang = 'RESET_ONLINE_CONFIRM'; + break; + case 'stats': + $confirm = true; + $confirm_lang = 'RESYNC_STATS_CONFIRM'; + break; + case 'user': + $confirm = true; + $confirm_lang = 'RESYNC_POSTCOUNTS_CONFIRM'; + break; + case 'date': + $confirm = true; + $confirm_lang = 'RESET_DATE_CONFIRM'; + break; + case 'db_track': + $confirm = true; + $confirm_lang = 'RESYNC_POST_MARKING_CONFIRM'; + break; + + default: + $confirm = true; + $confirm_lang = 'CONFIRM_OPERATION'; + } + + if ($confirm) + { + confirm_box(false, $user->lang[$confirm_lang], build_hidden_fields(array( + 'i' => $id, + 'mode' => $mode, + 'action' => $action, + ))); + } + } + switch ($action) { case 'online': @@ -74,29 +114,23 @@ class acp_main FROM ' . POSTS_TABLE . ' WHERE post_approved = 1'; $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); + set_config('num_posts', (int) $db->sql_fetchfield('stat'), true); $db->sql_freeresult($result); - set_config('num_posts', (int) $row['stat'], true); - $sql = 'SELECT COUNT(topic_id) AS stat FROM ' . TOPICS_TABLE . ' WHERE topic_approved = 1'; $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); + set_config('num_topics', (int) $db->sql_fetchfield('stat'), true); $db->sql_freeresult($result); - set_config('num_topics', (int) $row['stat'], true); - $sql = 'SELECT COUNT(user_id) AS stat FROM ' . USERS_TABLE . ' WHERE user_type IN (' . USER_NORMAL . ',' . USER_FOUNDER . ')'; $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); + set_config('num_users', (int) $db->sql_fetchfield('stat'), true); $db->sql_freeresult($result); - set_config('num_users', (int) $row['stat'], true); - $sql = 'SELECT COUNT(attach_id) as stat FROM ' . ATTACHMENTS_TABLE . ' WHERE is_orphan = 0'; @@ -296,7 +330,6 @@ class acp_main } $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')); $template->assign_vars(array( 'TOTAL_POSTS' => $total_posts, @@ -320,7 +353,7 @@ class acp_main 'U_ADMIN_LOG' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=logs&mode=admin'), 'U_INACTIVE_USERS' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=inactive&mode=list'), - 'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? $s_action_options : '', + 'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false, ) ); |
