Upgrade to KH 3.3.0
This commit is contained in:
@@ -13,12 +13,14 @@ class Controller_Codebench extends Kohana_Controller_Template {
|
||||
// The codebench view
|
||||
public $template = 'codebench';
|
||||
|
||||
public function action_index($class)
|
||||
public function action_index()
|
||||
{
|
||||
$class = $this->request->param('class');
|
||||
|
||||
// Convert submitted class name to URI segment
|
||||
if (isset($_POST['class']))
|
||||
{
|
||||
$this->request->redirect('codebench/'.trim($_POST['class']));
|
||||
throw HTTP_Exception::factory(302)->location('codebench/'.trim($_POST['class']));
|
||||
}
|
||||
|
||||
// Pass the class name on to the view
|
@@ -47,7 +47,7 @@ abstract class Kohana_Codebench {
|
||||
public function __construct()
|
||||
{
|
||||
// Set the maximum execution time
|
||||
set_time_limit(Kohana::config('codebench')->max_execution_time);
|
||||
set_time_limit(Kohana::$config->load('codebench')->max_execution_time);
|
||||
}
|
||||
|
||||
/**
|
@@ -17,7 +17,7 @@ return array(
|
||||
'description' => 'Code benchmarking tool.',
|
||||
|
||||
// Copyright message, shown in the footer for this module
|
||||
'copyright' => '© 2008–2010 Kohana Team',
|
||||
'copyright' => '© 2008–2012 Kohana Team',
|
||||
)
|
||||
)
|
||||
);
|
@@ -3,6 +3,6 @@
|
||||
// Catch-all route for Codebench classes to run
|
||||
Route::set('codebench', 'codebench(/<class>)')
|
||||
->defaults(array(
|
||||
'controller' => 'codebench',
|
||||
'controller' => 'Codebench',
|
||||
'action' => 'index',
|
||||
'class' => NULL));
|
||||
|
@@ -111,7 +111,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
<?php if (Kohana::config('codebench')->expand_all) { ?>
|
||||
<?php if (Kohana::$config->load('codebench')->expand_all) { ?>
|
||||
// Expand all benchmark details by default
|
||||
$toggle_all.click();
|
||||
<?php } ?>
|
||||
@@ -245,7 +245,7 @@
|
||||
<?php echo Text::auto_p(Text::auto_link($codebench['description']), FALSE) ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php // echo '<h2>Raw output:</h2>', Kohana::debug($codebench) ?>
|
||||
<?php // echo '<h2>Raw output:</h2>', Debug::vars($codebench) ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
Reference in New Issue
Block a user