From 624654f9634810cf50bc18d90accd72801981950 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 23 Sep 2006 19:25:33 +0000 Subject: [PATCH] Cleaning up construct_debug_block() a little --- kernel.php | 77 +++--------------------------------------------------- 1 file changed, 3 insertions(+), 74 deletions(-) diff --git a/kernel.php b/kernel.php index 4db0b41..6d7b3e3 100644 --- a/kernel.php +++ b/kernel.php @@ -47,7 +47,7 @@ define('REQ_NO', 0); * ISSO_MT_START - Define the microtime() value at the top of your * script and this will calculate the total execution * time -* SVN - Place SVN keywords (like $Id) to display the information on output +* SVN - Place SVN $Id keyword to get SVN revision information on output * * @author Blue Static * @copyright Copyright ©2002 - [#]year[#], Blue Static @@ -57,53 +57,6 @@ define('REQ_NO', 0); */ class ISSO { - /** - * ISSO version - * @var string - */ - private $version = '[#]issoversion[#]'; - - /** - * List of loaded modules - * @var array - */ - private $modules = array(); - - // ################################################################### - /** - * Prints a list of all currently loaded framework modules - * - * @param bool Return the data as an array? - * - * @return mixed HTML output or an array of loaded modules - */ - public function show_modules($return = false) - { - $modules = array(); - foreach ($this->modules AS $object) - { - $module = get_class($object); - if (method_exists($object, 'init_as_package') AND in_array($module, $modules)) - { - $module = $object->init_as_package() . " - ($module)"; - } - - $modules[] = $module; - } - - if ($return) - { - return $modules; - } - else - { - $output = "\n\n\n\n"; - $this->message('Loaded Modules', $output, 1); - } - } - // ################################################################### /** * Constructs a debug information box that contains various debugging @@ -143,26 +96,11 @@ class ISSO } // source control - $scinfo = 'Not Under Source Control'; - if (defined('SVN')) + if (defined('SVN') AND preg_match('#\$Id:?\s*\$#', constant('SVN'))) { - $scinfo = constant('SVN'); - - if (preg_match('#\$Id:?\s*\$#', $scinfo)) - { - $scinfo = 'Not Under Source Control'; - } - else - { - $scinfo = preg_replace('#\$' . '(Head)?URL: (.+?) \$#e', "end(explode('/', '\\2'))", $scinfo); - $scinfo = preg_replace('#\$' . '(LastModified)?Revision: (.+?) \$#', 'SVN \\2', $scinfo); - $scinfo = preg_replace('#\$' . 'Id: (.+?) ([0-9].+?) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}(.+?) (.+?) \$#', '\\1 - SVN \\2', $scinfo); - } + $debug .= "\n\t
  • Source Control: " . preg_replace('#\$' . 'Id: (.+?) ([0-9].+?) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}(.+?) (.+?) \$#', '\\1 - SVN \\2', constant('SVN')) . "
  • "; } - $scinfo = trim($scinfo); - $debug .= "\n\t
  • Source Control: $scinfo
  • "; - // query information if (is_object($this->modules[ISSO_DB_LAYER])) { @@ -184,15 +122,6 @@ class ISSO } $debug .= "\n\t\t\n\t"; - // loaded modules - $modules = $this->show_modules(true); - $debug .= "\n\t
  • \n\t\t\n\t
  • "; - // template usage if ($dotemplates) { -- 2.43.5