From 043d45c35743c8b00940ef208f49faeb035007a3 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Tue, 28 Jan 2003 20:45:42 +0000 Subject: [PATCH] Missing cache save from page_footer() + unecessary cache update for word censors git-svn-id: file:///svn/phpbb/trunk@3395 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/admin/admin_words.php | 19 ------------------- phpBB/admin/pagestart.php | 7 ++++++- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/phpBB/admin/admin_words.php b/phpBB/admin/admin_words.php index 628e0318f3..fb92a75785 100644 --- a/phpBB/admin/admin_words.php +++ b/phpBB/admin/admin_words.php @@ -167,25 +167,6 @@ if ($mode != '') } - $sql = "SELECT * - FROM " . WORDS_TABLE . " - ORDER BY word"; - $result = $db->sql_query($sql); - - if ($row = $db->sql_fetchrow($result)) - { - $censors = array(); - do - { - $censors['match'][] = '#\b(' . str_replace('\*', '\w*?', preg_quote($row['word'], '#')) . ')\b#i'; - $censors['replace'][] = $row['replacement']; - } - while ($row = $db->sql_fetchrow($result)); - - $cache->put('word_censors', $censors); - } - $db->sql_freeresult($result); - trigger_error($message); } diff --git a/phpBB/admin/pagestart.php b/phpBB/admin/pagestart.php index 9460f86582..e2096baf4f 100644 --- a/phpBB/admin/pagestart.php +++ b/phpBB/admin/pagestart.php @@ -101,7 +101,7 @@ td.cat { background-image: url('images/cellpic1.gif') } function page_footer($copyright_html = true) { - global $config, $db, $phpEx; + global $cache, $config, $db, $phpEx; // Close our DB connection. $db->sql_close(); @@ -127,6 +127,11 @@ function page_footer($copyright_html = true) } + if (!empty($cache)) + { + $cache->save_cache(); + } + exit; }