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
This commit is contained in:
Paul S. Owen 2003-01-28 20:45:42 +00:00
parent 4ce762b83b
commit 043d45c357
2 changed files with 6 additions and 20 deletions

View file

@ -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);
}

View file

@ -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;
}