1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 03:04:09 +02:00

- 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
This commit is contained in:
Nils Adermann
2007-02-08 22:11:14 +00:00
parent 766e311ff3
commit 56a93bdfdd
11 changed files with 129 additions and 44 deletions

View File

@@ -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,
)
);