diff --git a/contrib/blotter/main.php b/contrib/blotter/main.php index 04cd2e8c..d689ba15 100644 --- a/contrib/blotter/main.php +++ b/contrib/blotter/main.php @@ -123,7 +123,8 @@ class Blotter extends SimpleExtension { private function display_blotter() { global $database, $config; $limit = $config->get_int("blotter_recent", 5); - $entries = $database->get_all("SELECT * FROM blotter ORDER BY id DESC LIMIT :lim", array("lim"=>$limit)); + $sql = 'SELECT * FROM blotter ORDER BY id DESC LIMIT '.intval($limit); + $entries = $database->get_all($sql); $this->theme->display_blotter($entries); } } diff --git a/core/util.inc.php b/core/util.inc.php index e5fd8d1e..d6ce5354 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -745,7 +745,7 @@ function send_event(Event $event) { \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ function get_debug_info() { - global $config, $_event_count; + global $config, $_event_count, $database, $_execs; if(function_exists('memory_get_usage')) { $i_mem = sprintf("%5.2f", ((memory_get_usage()+512)/1024)/1024); @@ -762,15 +762,16 @@ function get_debug_info() { $i_utime = "???"; $i_stime = "???"; } + $i_files = count(get_included_files()); - global $_execs; - global $database; $hits = $database->cache->get_hits(); $miss = $database->cache->get_misses(); + $debug = "
Took $i_utime + $i_stime seconds and {$i_mem}MB of RAM"; $debug .= "; Used $i_files files and $_execs queries"; $debug .= "; Sent $_event_count events"; $debug .= "; $hits cache hits and $miss misses"; + $debug .= "; Shimmie version ". VERSION .", SCore Version ". SCORE_VERSION; return $debug; }