mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
Merge branch 'develop' into feature/merging-style-components
* develop: (175 commits) [feature/ajax] Remove strange non-breaking spaces from approve button [feature/ajax] Add entirely unrelated but nice newlines [feature/ajax] Unify phpbb_json_response instantiation [feature/ajax] Fix acp_styles activate_deactivate ajax callback name [feature/ajax] Send correct activate/deactivate JSON response in acp_profile [ticket/10270] Alter background colors for posts [feature/ajax] Remove not working module enable/disable ajax code [feature/ajax] Replace static call to phpbb_request with OO [feature/ajax] Remove quick-reply AJAX handling until we have something good [ticket/10270] Changing close button for ajax popups [ticket/10270] Disabling links in disappearing content [ticket/10291] Fixed an AJAX bug on quick reply form submit. [ticket/10273] Fixed accepting / denying posts AJAX. [ticket/10272] Removed code that was prevent event propogation in AJAX. [ticket/10291] Fixed a bug in the quick reply AJAX. [feature/ajax] Handle acp_modules error cases with JSON response [feature/ajax] Fix filter check, quick mod tools data-attribute [feature/ajax] Use the error handler [feature/ajax] Generic error handling with a phpbb.alert box [feature/ajax] Change filter semantics, some minor adjustments ... Conflicts: phpBB/adm/style/acp_styles.html phpBB/includes/acp/acp_styles.php
This commit is contained in:
@@ -24,7 +24,7 @@ class acp_bbcodes
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache;
|
||||
global $db, $user, $auth, $template, $cache, $request;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
$user->add_lang('acp/posting');
|
||||
@@ -272,6 +272,18 @@ class acp_bbcodes
|
||||
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
|
||||
$cache->destroy('sql', BBCODES_TABLE);
|
||||
add_log('admin', 'LOG_BBCODE_DELETE', $row['bbcode_tag']);
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $user->lang['BBCODE_DELETED'],
|
||||
'REFRESH_DATA' => array(
|
||||
'time' => 3
|
||||
)
|
||||
));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -24,7 +24,7 @@ class acp_bots
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $cache;
|
||||
global $config, $db, $user, $auth, $template, $cache, $request;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
||||
|
||||
$action = request_var('action', '');
|
||||
@@ -352,6 +352,14 @@ class acp_bots
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if ($request->is_ajax() && ($action == 'activate' || $action == 'deactivate'))
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response->send(array(
|
||||
'text' => $user->lang['BOT_' . (($action == 'activate') ? 'DE' : '') . 'ACTIVATE'],
|
||||
));
|
||||
}
|
||||
|
||||
$s_options = '';
|
||||
$_options = array('activate' => 'BOT_ACTIVATE', 'deactivate' => 'BOT_DEACTIVATE', 'delete' => 'DELETE');
|
||||
|
@@ -25,7 +25,7 @@ class acp_forums
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache;
|
||||
global $db, $user, $auth, $template, $cache, $request;
|
||||
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
|
||||
|
||||
$user->add_lang('acp/forums');
|
||||
@@ -255,6 +255,12 @@ class acp_forums
|
||||
add_log('admin', 'LOG_FORUM_' . strtoupper($action), $row['forum_name'], $move_forum_name);
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
}
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response->send(array('success' => ($move_forum_name !== false)));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
@@ -782,6 +782,18 @@ class acp_icons
|
||||
|
||||
$cache->destroy('_icons');
|
||||
$cache->destroy('sql', $table);
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $notice,
|
||||
'REFRESH_DATA' => array(
|
||||
'time' => 3
|
||||
)
|
||||
));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -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,14 +346,14 @@ class acp_main
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_RESYNC_POST_MARKING');
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('RESYNC_POST_MARKING_SUCCESS');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'purge_cache':
|
||||
if ((int) $user->data['user_type'] !== USER_FOUNDER)
|
||||
{
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
global $cache;
|
||||
$cache->purge();
|
||||
|
||||
@@ -343,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':
|
||||
@@ -389,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;
|
||||
}
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ class acp_modules
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $module;
|
||||
global $db, $user, $auth, $template, $module, $request;
|
||||
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
|
||||
|
||||
// Set a global define for modules we might include (the author is able to prevent execution of code by checking this constant)
|
||||
@@ -373,6 +373,15 @@ class acp_modules
|
||||
// Default management page
|
||||
if (sizeof($errors))
|
||||
{
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang('ERROR'),
|
||||
'MESSAGE_TEXT' => implode('<br />', $errors),
|
||||
));
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_ERROR' => true,
|
||||
'ERROR_MSG' => implode('<br />', $errors))
|
||||
|
@@ -242,6 +242,15 @@ class acp_profile
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
add_log('admin', 'LOG_PROFILE_FIELD_ACTIVATE', $field_ident);
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response();
|
||||
$json_response->send(array(
|
||||
'text' => $user->lang('DEACTIVATE'),
|
||||
));
|
||||
}
|
||||
|
||||
trigger_error($user->lang['PROFILE_FIELD_ACTIVATED'] . adm_back_link($this->u_action));
|
||||
|
||||
break;
|
||||
@@ -266,7 +275,16 @@ class acp_profile
|
||||
$field_ident = (string) $db->sql_fetchfield('field_ident');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response();
|
||||
$json_response->send(array(
|
||||
'text' => $user->lang('ACTIVATE'),
|
||||
));
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_PROFILE_FIELD_DEACTIVATE', $field_ident);
|
||||
|
||||
trigger_error($user->lang['PROFILE_FIELD_DEACTIVATED'] . adm_back_link($this->u_action));
|
||||
|
||||
break;
|
||||
|
@@ -24,7 +24,7 @@ class acp_ranks
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache;
|
||||
global $db, $user, $auth, $template, $cache, $request;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
$user->add_lang('acp/posting');
|
||||
@@ -122,6 +122,18 @@ class acp_ranks
|
||||
$cache->destroy('_ranks');
|
||||
|
||||
add_log('admin', 'LOG_RANK_REMOVED', $rank_title);
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $user->lang['RANK_REMOVED'],
|
||||
'REFRESH_DATA' => array(
|
||||
'time' => 3
|
||||
)
|
||||
));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user