mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Changing sql_dump element so it only shows if there is no $logs variable set in the view. Overwriting it could adversely effect helper references. Fixes #998
This commit is contained in:
parent
1371cefc3d
commit
da9c0da626
1 changed files with 24 additions and 21 deletions
|
@ -20,9 +20,9 @@
|
|||
if (!class_exists('ConnectionManager') || Configure::read('debug') < 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$sources = ConnectionManager::sourceList();
|
||||
if (!isset($logs)):
|
||||
$sources = ConnectionManager::sourceList();
|
||||
|
||||
$logs = array();
|
||||
foreach ($sources as $source):
|
||||
$db =& ConnectionManager::getDataSource($source);
|
||||
|
@ -31,7 +31,7 @@ if (!isset($logs)):
|
|||
endif;
|
||||
$logs[$source] = $db->getLog();
|
||||
endforeach;
|
||||
endif;
|
||||
|
||||
|
||||
foreach ($logs as $source => $logInfo):
|
||||
$text = $logInfo['count'] > 1 ? 'queries' : 'query';
|
||||
|
@ -51,4 +51,7 @@ foreach ($logs as $source => $logInfo):
|
|||
endforeach;
|
||||
?>
|
||||
</tbody></table>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
|
|
Loading…
Add table
Reference in a new issue