mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fix whitespace.
This commit is contained in:
parent
ae9ff9fbd0
commit
bea50f5246
1 changed files with 5 additions and 5 deletions
|
@ -37,7 +37,7 @@ if ($noLogs || isset($_forced_from_dbo_)):
|
||||||
foreach ($logs as $source => $logInfo):
|
foreach ($logs as $source => $logInfo):
|
||||||
$text = $logInfo['count'] > 1 ? 'queries' : 'query';
|
$text = $logInfo['count'] > 1 ? 'queries' : 'query';
|
||||||
printf(
|
printf(
|
||||||
'<table class="cake-sql-log" id="cakeSqlLog_%s" summary="Cake SQL Log" cellspacing="0" border = "0">',
|
'<table class="cake-sql-log" id="cakeSqlLog_%s" summary="Cake SQL Log" cellspacing="0">',
|
||||||
preg_replace('/[^A-Za-z0-9_]/', '_', uniqid(time(), true))
|
preg_replace('/[^A-Za-z0-9_]/', '_', uniqid(time(), true))
|
||||||
);
|
);
|
||||||
printf('<caption>(%s) %s %s took %s ms</caption>', $source, $logInfo['count'], $text, $logInfo['time']);
|
printf('<caption>(%s) %s %s took %s ms</caption>', $source, $logInfo['count'], $text, $logInfo['time']);
|
||||||
|
@ -49,13 +49,13 @@ if ($noLogs || isset($_forced_from_dbo_)):
|
||||||
<?php
|
<?php
|
||||||
foreach ($logInfo['log'] as $k => $i) :
|
foreach ($logInfo['log'] as $k => $i) :
|
||||||
$i += array('error' => '');
|
$i += array('error' => '');
|
||||||
if(!empty($i['params']) && is_array($i['params'])) {
|
if (!empty($i['params']) && is_array($i['params'])) {
|
||||||
$bindParam = $bindType = null;
|
$bindParam = $bindType = null;
|
||||||
if(preg_match('/.+ :.+/', $i['query'])) {
|
if (preg_match('/.+ :.+/', $i['query'])) {
|
||||||
$bindType = true;
|
$bindType = true;
|
||||||
}
|
}
|
||||||
foreach($i['params'] as $bindKey => $bindVal) {
|
foreach ($i['params'] as $bindKey => $bindVal) {
|
||||||
if($bindType === true) {
|
if ($bindType === true) {
|
||||||
$bindParam .= h($bindKey) ." => " . h($bindVal) . ", ";
|
$bindParam .= h($bindKey) ." => " . h($bindVal) . ", ";
|
||||||
} else {
|
} else {
|
||||||
$bindParam .= h($bindVal) . ", ";
|
$bindParam .= h($bindVal) . ", ";
|
||||||
|
|
Loading…
Add table
Reference in a new issue