--- a/includes/template.php Mon Nov 19 11:39:25 2012 -0500
+++ b/includes/template.php Mon Nov 19 11:40:35 2012 -0500
@@ -60,6 +60,13 @@
var $fading_button = '';
+ /**
+ * Context stack. You can save and restore the var set.
+ * @var array
+ */
+
+ var $context_stack = array('bool' => array(), 'str' => array(), 'history' => array());
+
function __construct()
{
global $db, $session, $paths, $template, $plugins; // Common objects
@@ -119,6 +126,24 @@
}
/**
+ * Save the current context and start a blank one.
+ */
+
+ function context_push()
+ {
+ array_push($this->context_stack['str'], $this->tpl_strings);
+ array_push($this->context_stack['bool'], $this->tpl_bool);
+ array_push($this->context_stack['history'], $this->vars_assign_history);
+ }
+
+ function context_pop()
+ {
+ $this->tpl_strings = array_pop($this->context_stack['str']);
+ $this->tpl_bool = array_pop($this->context_stack['bool']);
+ $this->vars_assign_history = array_pop($this->context_stack['history']);
+ }
+
+ /**
* Gets the list of available CSS files (styles) for the specified theme.
* @param string Theme ID
* @return array
@@ -1447,7 +1472,7 @@
$f = microtime_float();
$f = $f - $_starttime;
- $f = round($f, 2);
+ $f = sprintf("%.02f", $f);
$t_loc = $lang->get('page_msg_stats_gentime_short', array('time' => $f));
$t_loc_long = $lang->get('page_msg_stats_gentime_long', array('time' => $f));