Skip to content

Commit

Permalink
Removed compatibility code
Browse files Browse the repository at this point in the history
  • Loading branch information
enumag committed Aug 20, 2013
1 parent 16f48c0 commit f315c7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Kdyby/SessionPanel/DI/SessionPanelExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function afterCompile(Nette\Utils\PhpGenerator\ClassType $class)
$builder = $this->getContainerBuilder();
if ($builder->parameters['debugMode']) {
$class->methods['initialize']->addBody($builder->formatPhp(
'Nette\Diagnostics\Debugger::' . (method_exists('Nette\Diagnostics\Debugger', 'getBar') ? 'getBar()' : '$bar') . '->addPanel(?);',
'Nette\Diagnostics\Debugger::$bar->addPanel(?);',
Nette\DI\Compiler::filterArguments(array(new Nette\DI\Statement($this->prefix('@panel'))))
));
}
Expand Down
6 changes: 1 addition & 5 deletions src/Kdyby/SessionPanel/Diagnostics/SessionPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,7 @@ public function getPanel()
'time' => callback(get_called_class() . '::time'),
'esc' => callback('Nette\Templating\Helpers::escapeHtml'),
'click' => callback(function ($variable) {
if (class_exists('Nette\Diagnostics\Dumper')) {
return Nette\Diagnostics\Dumper::toHtml($variable, array(Nette\Diagnostics\Dumper::COLLAPSE => TRUE));
} else {
return Nette\Diagnostics\Helpers::clickableDump($variable, TRUE);
}
return Nette\Diagnostics\Helpers::clickableDump($variable, TRUE);
}),
'del' => function ($section = NULL, $sectionType = NULL) use ($url) {
$url = clone $url;
Expand Down

0 comments on commit f315c7d

Please sign in to comment.