--- a/includes/paths.php Wed May 13 09:47:31 2009 -0400
+++ b/includes/paths.php Wed May 13 09:47:59 2009 -0400
@@ -435,6 +435,10 @@
function sysmsg($n)
{
global $db, $session, $paths, $template, $plugins; // Common objects
+ static $sm_cache = array();
+
+ if ( isset($sm_cache[$n]) )
+ return $sm_cache[$n];
// sometimes this gets called during die_semicritical()...
if ( !is_object($db) )
@@ -460,6 +464,8 @@
$message = preg_replace('/<noinclude>(.*?)<\/noinclude>/is', '', $message);
$message = preg_replace('/<nodisplay>(.*?)<\/nodisplay>/is', '\\1', $message);
+ $sm_cache[$n] = $message;
+
return $message;
}
function get_pageid_from_url()