Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
close #4 Add support Smarty debug mode
  • Loading branch information
suin committed Apr 17, 2012
1 parent cb24110 commit 507fbad
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build/AdelieDebug.class.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/version
@@ -1 +1 @@
{"build":1329980270,"datetime":"2012-02-23 15:57:50"}
{"build":1334657656,"datetime":"2012-04-17 19:14:16"}
2 changes: 1 addition & 1 deletion compile_config.dist.php
Expand Up @@ -2,5 +2,5 @@

return array(
'phpCommand' => 'php',
'yuicompressor' => 'java -jar ~/bin/yuicompressor-2.4.6.jar',
'yuicompressor' => 'java -jar vendor/yuicompressor-2.4.7.jar',
);
11 changes: 11 additions & 0 deletions source/AdelieDebug/Debug/XoopsDebugger.php
Expand Up @@ -12,12 +12,18 @@
class AdelieDebug_Debug_XoopsDebugger extends Legacy_AbstractDebugger
{
protected $logger = null;
protected $isDebugRenderSystem = false;

public function __construct(AdelieDebug_Debug_Logger $logger)
{
$this->logger = $logger;
}

public function enableDebugRenderSystem()
{
$this->isDebugRenderSystem = true;
}

public function prepare()
{
$GLOBALS['xoopsErrorHandler'] =& AdelieDebug_Debug_XoopsErrorHandler::getInstance();
Expand All @@ -31,4 +37,9 @@ public function prepare()
$root->mController->mLogger = $xoopsLogger;
$root->mController->mDB->setLogger($xoopsLogger);
}

public function isDebugRenderSystem()
{
return $this->isDebugRenderSystem;
}
}
6 changes: 6 additions & 0 deletions source/AdelieDebug/Preload.php
Expand Up @@ -29,6 +29,12 @@ public function topAccessEventHandler()
public function setupDebugEventHandler($instance, $debugMode)
{
$instance = new AdelieDebug_Debug_XoopsDebugger($this->debugger->logger);

if ( $debugMode === XOOPS_DEBUG_SMARTY )
{
$instance->enableDebugRenderSystem();
}

$this->debugger->enableErrorReporting(); // Legacy_Controller::_setupDebugger() で error_reproting = 0 にされちゃってるので必要
}

Expand Down
Binary file added vendor/yuicompressor-2.4.7.jar
Binary file not shown.

0 comments on commit 507fbad

Please sign in to comment.