1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-26 04:55:12 +02:00

Destroy! Destroy! Danger! Will Robinson Danger! ... Doctor Smith will destroy the cached SQL when something changes ...

git-svn-id: file:///svn/phpbb/trunk@4394 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen
2003-08-12 22:24:19 +00:00
parent f8accfd986
commit 620f70fe1e

View File

@ -838,6 +838,8 @@ function viewsource(url)
$db->sql_query($sql); $db->sql_query($sql);
} }
$cache->destroy('sql', STYLES_CSS_TABLE);
$error[] = $user->lang['THEME_UPDATED']; $error[] = $user->lang['THEME_UPDATED'];
add_log('admin', 'LOG_EDIT_THEME', $theme_name); add_log('admin', 'LOG_EDIT_THEME', $theme_name);
} }
@ -1194,6 +1196,11 @@ function csspreview()
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
// $cache->destroy('sql', STYLES_IMAGE_TABLE);
$test_ary = array(); $test_ary = array();
foreach ($imglist as $category => $img_ary) foreach ($imglist as $category => $img_ary)
{ {
@ -1590,6 +1597,8 @@ function remove($type, $id)
} }
} }
$cache->destroy('sql', STYLES_TABLE);
add_log('admin', 'LOG_DELETE_' . $l_prefix, ${$type . '_name'}); add_log('admin', 'LOG_DELETE_' . $l_prefix, ${$type . '_name'});
$message = ($onfs) ? $l_prefix . '_DELETED_FS' : $l_prefix . '_DELETED'; $message = ($onfs) ? $l_prefix . '_DELETED_FS' : $l_prefix . '_DELETED';
trigger_error($user->lang[$message]); trigger_error($user->lang[$message]);
@ -2422,7 +2431,7 @@ function install_style($action, $name, $copyright, $active, $default, $root_path
// Commented inline // Commented inline
function install($type, $action, $id) function install($type, $action, $id)
{ {
global $phpbb_root_path, $phpEx, $SID, $config, $db, $user; global $phpbb_root_path, $phpEx, $SID, $config, $db, $cache, $user;
global $safe_mode, $file_uploads, $archive_preg; global $safe_mode, $file_uploads, $archive_preg;
$install_path = (isset($_REQUEST['path'])) ? htmlspecialchars($_REQUEST['path']) : ''; $install_path = (isset($_REQUEST['path'])) ? htmlspecialchars($_REQUEST['path']) : '';
@ -2641,6 +2650,8 @@ function install($type, $action, $id)
if (!sizeof($error)) if (!sizeof($error))
{ {
$cache->destroy('sql', STYLES_TABLE);
$message = ($storedb) ? '_ADDED_DB' : '_ADDED'; $message = ($storedb) ? '_ADDED_DB' : '_ADDED';
trigger_error($user->lang[$l_type . $message]); trigger_error($user->lang[$l_type . $message]);
} }
@ -2721,6 +2732,8 @@ function install($type, $action, $id)
if (!sizeof($error)) if (!sizeof($error))
{ {
$cache->destroy('sql', STYLES_TABLE);
$message = ($storedb) ? '_ADDED_DB' : '_ADDED'; $message = ($storedb) ? '_ADDED_DB' : '_ADDED';
trigger_error($user->lang["$l_type$message"]); trigger_error($user->lang["$l_type$message"]);
} }
@ -2817,6 +2830,8 @@ function install($type, $action, $id)
} }
} }
$cache->destroy('sql', STYLES_TABLE);
add_log('admin', 'LOG_EDIT_' . $l_type, $name); add_log('admin', 'LOG_EDIT_' . $l_type, $name);
trigger_error($user->lang[$l_type . '_EDITED']); trigger_error($user->lang[$l_type . '_EDITED']);
} }