Removed the deprecated assign by reference from the new operator

git-svn-id: file:///svn-source/pmgr/branches/v0.3_php5.3_support@1007 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2011-03-12 22:43:15 +00:00
parent 5a9dd5252c
commit e8a62f98fc
5 changed files with 1108 additions and 1108 deletions

View File

@@ -163,7 +163,7 @@ class ToolbarComponent extends Object {
trigger_error(sprintf(__('Could not load DebugToolbar panel %s', true), $panel), E_USER_WARNING); trigger_error(sprintf(__('Could not load DebugToolbar panel %s', true), $panel), E_USER_WARNING);
continue; continue;
} }
$panelObj =& new $className(); $panelObj = new $className();
if (is_subclass_of($panelObj, 'DebugPanel') || is_subclass_of($panelObj, 'debugpanel')) { if (is_subclass_of($panelObj, 'DebugPanel') || is_subclass_of($panelObj, 'debugpanel')) {
$this->panels[$panel] =& $panelObj; $this->panels[$panel] =& $panelObj;
} }
@@ -456,7 +456,7 @@ class LogPanel extends DebugPanel {
* @return array * @return array
*/ */
function _parseFile($filename) { function _parseFile($filename) {
$file =& new File($filename); $file = new File($filename);
$contents = $file->read(); $contents = $file->read();
$timePattern = '/(\d{4}-\d{2}\-\d{2}\s\d{1,2}\:\d{1,2}\:\d{1,2})/'; $timePattern = '/(\d{4}-\d{2}\-\d{2}\s\d{1,2}\:\d{1,2}\:\d{1,2})/';
$chunks = preg_split($timePattern, $contents, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); $chunks = preg_split($timePattern, $contents, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);

View File

@@ -49,7 +49,7 @@ class DebugViewTestCase extends CakeTestCase {
Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home')); Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
Router::parse('/'); Router::parse('/');
$this->Controller =& ClassRegistry::init('Controller'); $this->Controller =& ClassRegistry::init('Controller');
$this->View =& new DebugView($this->Controller, false); $this->View = new DebugView($this->Controller, false);
$this->_debug = Configure::read('debug'); $this->_debug = Configure::read('debug');
} }
@@ -98,7 +98,7 @@ class DebugViewTestCase extends CakeTestCase {
'here' => '/posts/index', 'here' => '/posts/index',
); );
$this->Controller->layout = 'default'; $this->Controller->layout = 'default';
$View =& new DebugView($this->Controller, false); $View = new DebugView($this->Controller, false);
$View->render('index'); $View->render('index');
$result = DebugKitDebugger::getTimers(); $result = DebugKitDebugger::getTimers();

View File

@@ -41,8 +41,8 @@ class FirePhpToolbarHelperTestCase extends CakeTestCase {
Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home')); Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
Router::parse('/'); Router::parse('/');
$this->Toolbar =& new ToolbarHelper(array('output' => 'DebugKit.FirePhpToolbar')); $this->Toolbar = new ToolbarHelper(array('output' => 'DebugKit.FirePhpToolbar'));
$this->Toolbar->FirePhpToolbar =& new FirePhpToolbarHelper(); $this->Toolbar->FirePhpToolbar = new FirePhpToolbarHelper();
$this->Controller =& ClassRegistry::init('Controller'); $this->Controller =& ClassRegistry::init('Controller');
if (isset($this->_debug)) { if (isset($this->_debug)) {

View File

@@ -38,10 +38,10 @@ class HtmlToolbarHelperTestCase extends CakeTestCase {
Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home')); Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
Router::parse('/'); Router::parse('/');
$this->Toolbar =& new ToolbarHelper(array('output' => 'DebugKit.HtmlToolbar')); $this->Toolbar = new ToolbarHelper(array('output' => 'DebugKit.HtmlToolbar'));
$this->Toolbar->HtmlToolbar =& new HtmlToolbarHelper(); $this->Toolbar->HtmlToolbar = new HtmlToolbarHelper();
$this->Toolbar->HtmlToolbar->Html =& new HtmlHelper(); $this->Toolbar->HtmlToolbar->Html = new HtmlHelper();
$this->Toolbar->HtmlToolbar->Javascript =& new JavascriptHelper(); $this->Toolbar->HtmlToolbar->Javascript = new JavascriptHelper();
$this->Controller =& ClassRegistry::init('Controller'); $this->Controller =& ClassRegistry::init('Controller');
if (isset($this->_debug)) { if (isset($this->_debug)) {

View File

@@ -30,14 +30,14 @@ $timers = DebugKitDebugger::getTimers();
?> ?>
<h2><?php __('Timers'); ?></h2> <h2><?php __('Timers'); ?></h2>
<p class="request-time"> <p class="request-time">
<?php $totalTime = sprintf(__('%s (seconds)', true), $number->precision(DebugKitDebugger::requestTime(), 6)); ?> <?php $totalTime = sprintf(__('%s (seconds)', true), DebugKitDebugger::requestTime()); ?>
<?php echo $toolbar->message(__('Total Request Time:', true), $totalTime)?> <?php echo $toolbar->message(__('Total Request Time:', true), $totalTime)?>
</p> </p>
<?php foreach ($timers as $timerName => $timeInfo): <?php foreach ($timers as $timerName => $timeInfo):
$rows[] = array( $rows[] = array(
$timeInfo['message'], $timeInfo['message'],
$number->precision($timeInfo['time'], 6) $timeInfo['time']
); );
$headers = array(__('Message', true), __('time in seconds', true)); $headers = array(__('Message', true), __('time in seconds', true));
endforeach; endforeach;