Skip to content

Instantly share code, notes, and snippets.

@fzaninotto
Created September 28, 2009 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fzaninotto/195553 to your computer and use it in GitHub Desktop.
Save fzaninotto/195553 to your computer and use it in GitHub Desktop.
Index: Y:/symfony/1.3/lib/plugins/sfPropelPlugin/lib/debug/sfWebDebugPanelPropel.class.php
===================================================================
--- Y:/symfony/1.3/lib/plugins/sfPropelPlugin/lib/debug/sfWebDebugPanelPropel.class.php (revision 22519)
+++ Y:/symfony/1.3/lib/plugins/sfPropelPlugin/lib/debug/sfWebDebugPanelPropel.class.php (working copy)
@@ -44,7 +44,7 @@
$this->formatSql(htmlspecialchars($log, ENT_QUOTES, sfConfig::get('sf_charset')))
);
}
-
+
return '
<div id="sfWebDebugDatabaseLogs">
<ol>
@@ -71,29 +71,9 @@
continue;
}
- if (preg_match('/^(?:prepare|exec|query): (.*)$/s', $log['message'], $match))
- {
- $logs[$i++] = $match[1];
- $bindings[$i - 1] = array();
- }
- else if (preg_match('/Binding (.*) at position (.+?) w\//', $log['message'], $match))
- {
- $bindings[$i - 1][$match[2]] = $match[1];
- }
+ $logs[$i++] = $log['message'];
}
- foreach ($logs as $i => $log)
- {
- if (count($bindings[$i]))
- {
- $bindings[$i] = array_reverse($bindings[$i]);
- foreach ($bindings[$i] as $search => $replace)
- {
- $logs[$i] = str_replace($search, $replace, $logs[$i]);
- }
- }
- }
-
return $logs;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment