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:
mark_story 2010-08-10 23:09:27 -04:00
parent 1371cefc3d
commit da9c0da626

View file

@ -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;
?>