diff options
Diffstat (limited to 'phpBB/includes/acp/acp_main.php')
| -rw-r--r-- | phpBB/includes/acp/acp_main.php | 48 | 
1 files changed, 37 insertions, 11 deletions
| diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index e529ae0e5a..144b225766 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -2,9 +2,8 @@  /**  *  * @package acp -* @version $Id$  * @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2  *  */ @@ -25,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 @@ -130,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': @@ -180,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': @@ -242,7 +251,11 @@ class acp_main  						}  						add_log('admin', 'LOG_RESYNC_POSTCOUNTS'); - +						 +						if ($request->is_ajax()) +						{ +							trigger_error('RESYNC_POSTCOUNTS_SUCCESS'); +						}  					break;  					case 'date': @@ -253,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': @@ -328,14 +346,14 @@ class acp_main  						}  						add_log('admin', 'LOG_RESYNC_POST_MARKING'); -					break; - -					case 'purge_cache': -						if ((int) $user->data['user_type'] !== USER_FOUNDER) +						 +						if ($request->is_ajax())  						{ -							trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); +							trigger_error('RESYNC_POST_MARKING_SUCCESS');  						} +					break; +					case 'purge_cache':  						global $cache;  						$cache->purge(); @@ -344,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': @@ -390,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;  				}  			} @@ -621,5 +649,3 @@ class acp_main  		$this->page_title = 'ACP_MAIN';  	}  } - -?>
\ No newline at end of file | 
