mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
resolve unnecessary naming conflict in SQL dump output
This commit is contained in:
parent
a10275fb8b
commit
4c4fdc6f70
1 changed files with 5 additions and 5 deletions
|
@ -20,22 +20,22 @@
|
|||
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">',
|
||||
|
@ -71,5 +71,5 @@ if ($noLogs || isset($_forced_from_dbo_)):
|
|||
<?php
|
||||
endforeach;
|
||||
else:
|
||||
echo '<p>Encountered unexpected $logs cannot generate SQL log</p>';
|
||||
echo '<p>Encountered unexpected $sqlLogs cannot generate SQL log</p>';
|
||||
endif;
|
||||
|
|
Loading…
Add table
Reference in a new issue