1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/10271] AJAXified buttons on acp_main.

PHPBB3-10271
This commit is contained in:
Callum Macrae
2011-08-24 16:06:06 +01:00
committed by Igor Wiedler
parent 1cb3b595ec
commit 4ae74cd4b4
3 changed files with 50 additions and 9 deletions

View File

@@ -24,7 +24,7 @@ class acp_main
function main($id, $mode)
{
global $config, $db, $user, $auth, $template;
global $config, $db, $user, $auth, $template, $request;
global $phpbb_root_path, $phpbb_admin_path, $phpEx;
// Show restore permissions notice
@@ -129,6 +129,11 @@ class acp_main
set_config('record_online_users', 1, true);
set_config('record_online_date', time(), true);
add_log('admin', 'LOG_RESET_ONLINE');
if ($request->is_ajax())
{
trigger_error('RESET_ONLINE_SUCCESS');
}
break;
case 'stats':
@@ -179,6 +184,11 @@ class acp_main
update_last_username();
add_log('admin', 'LOG_RESYNC_STATS');
if ($request->is_ajax())
{
trigger_error('RESYNC_STATS_SUCCESS');
}
break;
case 'user':
@@ -241,7 +251,11 @@ class acp_main
}
add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
if ($request->is_ajax())
{
trigger_error('RESYNC_POSTCOUNTS_SUCCESS');
}
break;
case 'date':
@@ -252,6 +266,11 @@ class acp_main
set_config('board_startdate', time() - 1);
add_log('admin', 'LOG_RESET_DATE');
if ($request->is_ajax())
{
trigger_error('RESET_DATE_SUCCESS');
}
break;
case 'db_track':
@@ -327,6 +346,11 @@ class acp_main
}
add_log('admin', 'LOG_RESYNC_POST_MARKING');
if ($request->is_ajax())
{
trigger_error('RESYNC_POST_MARKING_SUCCESS');
}
break;
case 'purge_cache':
@@ -338,6 +362,11 @@ class acp_main
cache_moderators();
add_log('admin', 'LOG_PURGE_CACHE');
if ($request->is_ajax())
{
trigger_error('PURGE_CACHE_SUCCESS');
}
break;
case 'purge_sessions':
@@ -384,6 +413,11 @@ class acp_main
$db->sql_query($sql);
add_log('admin', 'LOG_PURGE_SESSIONS');
if ($request->is_ajax())
{
trigger_error('PURGE_SESSIONS_SUCCESS');
}
break;
}
}