mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/11768] This commit integrates s9e\TextFormatter
This commit integrates s9e\TextFormatter as outlined in http://area51.phpbb.com/phpBB/viewtopic.php?f=108&t=44467 PHPBB3-11768
This commit is contained in:
@@ -269,6 +269,7 @@ class acp_bbcodes
|
||||
|
||||
$db->sql_query('INSERT INTO ' . BBCODES_TABLE . $db->sql_build_array('INSERT', $sql_ary));
|
||||
$cache->destroy('sql', BBCODES_TABLE);
|
||||
$phpbb_container->get('text_formatter.cache')->invalidate();
|
||||
|
||||
$lang = 'BBCODE_ADDED';
|
||||
$log_action = 'LOG_BBCODE_ADD';
|
||||
@@ -280,6 +281,7 @@ class acp_bbcodes
|
||||
WHERE bbcode_id = ' . $bbcode_id;
|
||||
$db->sql_query($sql);
|
||||
$cache->destroy('sql', BBCODES_TABLE);
|
||||
$phpbb_container->get('text_formatter.cache')->invalidate();
|
||||
|
||||
$lang = 'BBCODE_EDITED';
|
||||
$log_action = 'LOG_BBCODE_EDIT';
|
||||
|
@@ -28,7 +28,7 @@ class acp_icons
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache;
|
||||
global $db, $user, $auth, $template, $cache, $phpbb_container;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $request, $phpbb_container;
|
||||
|
||||
@@ -486,6 +486,7 @@ class acp_icons
|
||||
|
||||
$cache->destroy('_icons');
|
||||
$cache->destroy('sql', $table);
|
||||
$phpbb_container->get('text_formatter.cache')->invalidate();
|
||||
|
||||
$level = ($icons_updated) ? E_USER_NOTICE : E_USER_WARNING;
|
||||
$errormsgs = '';
|
||||
@@ -661,6 +662,7 @@ class acp_icons
|
||||
|
||||
$cache->destroy('_icons');
|
||||
$cache->destroy('sql', $table);
|
||||
$phpbb_container->get('text_formatter.cache')->invalidate();
|
||||
|
||||
trigger_error($user->lang[$lang . '_IMPORT_SUCCESS'] . adm_back_link($this->u_action));
|
||||
}
|
||||
@@ -783,6 +785,7 @@ class acp_icons
|
||||
|
||||
$cache->destroy('_icons');
|
||||
$cache->destroy('sql', $table);
|
||||
$phpbb_container->get('text_formatter.cache')->invalidate();
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
@@ -848,6 +851,7 @@ class acp_icons
|
||||
|
||||
$cache->destroy('_icons');
|
||||
$cache->destroy('sql', $table);
|
||||
$phpbb_container->get('text_formatter.cache')->invalidate();
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
|
@@ -352,6 +352,11 @@ class acp_main
|
||||
$config->increment('assets_version', 1);
|
||||
$cache->purge();
|
||||
|
||||
// Remove old renderers from the text_formatter service. Since this
|
||||
// operation is performed after the cache is purged, there is not "current"
|
||||
// renderer and in effect all renderers will be purged
|
||||
$phpbb_container->get('text_formatter.cache')->tidy();
|
||||
|
||||
// Clear permissions
|
||||
$auth->acl_clear_prefetch();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
|
@@ -115,6 +115,7 @@ class acp_words
|
||||
}
|
||||
|
||||
$cache->destroy('_word_censors');
|
||||
$phpbb_container->get('text_formatter.cache')->invalidate();
|
||||
|
||||
$log_action = ($word_id) ? 'LOG_WORD_EDIT' : 'LOG_WORD_ADD';
|
||||
|
||||
@@ -148,6 +149,7 @@ class acp_words
|
||||
$db->sql_query($sql);
|
||||
|
||||
$cache->destroy('_word_censors');
|
||||
$phpbb_container->get('text_formatter.cache')->invalidate();
|
||||
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_WORD_DELETE', false, array($deleted_word));
|
||||
|
||||
|
Reference in New Issue
Block a user