mirror of
https://github.com/brmlab/brmsklad.git
synced 2025-08-03 22:53:58 +02:00
Upgrade CakePHP from 2.2.5 to 2.9.5
This commit is contained in:
parent
5a580df460
commit
235a541597
793 changed files with 60746 additions and 23753 deletions
7
lib/Cake/View/Elements/Flash/default.ctp
Normal file
7
lib/Cake/View/Elements/Flash/default.ctp
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
$class = 'message';
|
||||
if (!empty($params['class'])) {
|
||||
$class .= ' ' . $params['class'];
|
||||
}
|
||||
?>
|
||||
<div id="<?php echo h($key) ?>Message" class="<?php echo h($class) ?>"><?php echo h($message) ?></div>
|
1
lib/Cake/View/Elements/Flash/error.ctp
Normal file
1
lib/Cake/View/Elements/Flash/error.ctp
Normal file
|
@ -0,0 +1 @@
|
|||
<div id="<?php echo h($key) ?>Message" class="message error"><?php echo h($message) ?></div>
|
1
lib/Cake/View/Elements/Flash/success.ctp
Normal file
1
lib/Cake/View/Elements/Flash/success.ctp
Normal file
|
@ -0,0 +1 @@
|
|||
<div id="<?php echo h($key) ?>Message" class="message success"><?php echo h($message) ?></div>
|
|
@ -2,21 +2,22 @@
|
|||
/**
|
||||
* Prints a stack trace for an exception
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.View.Elements
|
||||
* @since CakePHP(tm) v 1.3
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
App::uses('Debugger', 'Utility');
|
||||
|
||||
?>
|
||||
<h3>Stack Trace</h3>
|
||||
<ul class="cake-stack-trace">
|
||||
|
@ -44,20 +45,20 @@ App::uses('Debugger', 'Utility');
|
|||
if (!empty($stack['args'])):
|
||||
foreach ((array)$stack['args'] as $arg):
|
||||
$args[] = Debugger::getType($arg);
|
||||
$params[] = Debugger::exportVar($arg, 2);
|
||||
$params[] = Debugger::exportVar($arg, 4);
|
||||
endforeach;
|
||||
endif;
|
||||
|
||||
$called = isset($stack['class']) ? $stack['class'] . $stack['type'] . $stack['function'] : $stack['function'];
|
||||
|
||||
|
||||
printf(
|
||||
'<a href="#" onclick="traceToggle(event, \'trace-args-%s\')">%s(%s)</a> ',
|
||||
$i,
|
||||
$called,
|
||||
implode(', ', $args)
|
||||
h(implode(', ', $args))
|
||||
);
|
||||
$arguments = sprintf('<div id="trace-args-%s" class="cake-code-dump" style="display: none;"><pre>', $i);
|
||||
$arguments .= implode("\n", $params);
|
||||
$arguments .= h(implode("\n", $params));
|
||||
$arguments .= '</pre></div>';
|
||||
endif;
|
||||
echo $excerpt;
|
||||
|
@ -68,7 +69,7 @@ App::uses('Debugger', 'Utility');
|
|||
<script type="text/javascript">
|
||||
function traceToggle(event, id) {
|
||||
var el = document.getElementById(id);
|
||||
el.style.display = (el.style.display == 'block') ? 'none' : 'block';
|
||||
el.style.display = (el.style.display === 'block') ? 'none' : 'block';
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,40 +1,40 @@
|
|||
<?php
|
||||
/**
|
||||
* SQL Dump element. Dumps out SQL log information
|
||||
*
|
||||
* PHP 5
|
||||
* SQL Dump element. Dumps out SQL log information
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.View.Elements
|
||||
* @since CakePHP(tm) v 1.3
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
if (!class_exists('ConnectionManager') || Configure::read('debug') < 2) {
|
||||
return false;
|
||||
}
|
||||
$noLogs = !isset($logs);
|
||||
$noLogs = !isset($sqlLogs);
|
||||
if ($noLogs):
|
||||
$sources = ConnectionManager::sourceList();
|
||||
|
||||
$logs = array();
|
||||
$sqlLogs = array();
|
||||
foreach ($sources as $source):
|
||||
$db = ConnectionManager::getDataSource($source);
|
||||
if (!method_exists($db, 'getLog')):
|
||||
continue;
|
||||
endif;
|
||||
$logs[$source] = $db->getLog();
|
||||
$sqlLogs[$source] = $db->getLog();
|
||||
endforeach;
|
||||
endif;
|
||||
|
||||
if ($noLogs || isset($_forced_from_dbo_)):
|
||||
foreach ($logs as $source => $logInfo):
|
||||
foreach ($sqlLogs as $source => $logInfo):
|
||||
$text = $logInfo['count'] > 1 ? 'queries' : 'query';
|
||||
printf(
|
||||
'<table class="cake-sql-log" id="cakeSqlLog_%s" summary="Cake SQL Log" cellspacing="0">',
|
||||
|
@ -56,19 +56,27 @@ if ($noLogs || isset($_forced_from_dbo_)):
|
|||
}
|
||||
foreach ($i['params'] as $bindKey => $bindVal) {
|
||||
if ($bindType === true) {
|
||||
$bindParam .= h($bindKey) ." => " . h($bindVal) . ", ";
|
||||
$bindParam .= h($bindKey) . " => " . h($bindVal) . ", ";
|
||||
} else {
|
||||
$bindParam .= h($bindVal) . ", ";
|
||||
}
|
||||
}
|
||||
$i['query'] .= " , params[ " . rtrim($bindParam, ', ') . " ]";
|
||||
}
|
||||
echo "<tr><td>" . ($k + 1) . "</td><td>" . h($i['query']) . "</td><td>{$i['error']}</td><td style = \"text-align: right\">{$i['affected']}</td><td style = \"text-align: right\">{$i['numRows']}</td><td style = \"text-align: right\">{$i['took']}</td></tr>\n";
|
||||
printf('<tr><td>%d</td><td>%s</td><td>%s</td><td style="text-align: right">%d</td><td style="text-align: right">%d</td><td style="text-align: right">%d</td></tr>%s',
|
||||
$k + 1,
|
||||
h($i['query']),
|
||||
$i['error'],
|
||||
$i['affected'],
|
||||
$i['numRows'],
|
||||
$i['took'],
|
||||
"\n"
|
||||
);
|
||||
endforeach;
|
||||
?>
|
||||
</tbody></table>
|
||||
<?php
|
||||
endforeach;
|
||||
else:
|
||||
echo '<p>Encountered unexpected $logs cannot generate SQL log</p>';
|
||||
printf('<p>%s</p>', __d('cake_dev', 'Encountered unexpected %s. Cannot generate SQL log.', '$sqlLogs'));
|
||||
endif;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue