mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-17 16:58:51 +00:00
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:
parent
4ce762b83b
commit
043d45c357
2 changed files with 6 additions and 20 deletions
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue