1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-13 17:44:11 +02:00

- dibi::substitute -> dibi::getSubst

- dibi:removeSubst(TRUE) removes all substitutes
This commit is contained in:
David Grudl
2007-09-27 07:56:43 +00:00
parent 281cdb65e0
commit 0d8478d1d3
2 changed files with 17 additions and 12 deletions

View File

@@ -116,8 +116,8 @@ final class DibiTranslator
// TODO: check !!!
$sql = preg_replace('#\x00.*?\x00#s', '', $sql);
// error handling
if ($this->hasError) {
// TODO: do it better, remove dibi::$...
if (dibi::$logFile) { // log to file
dibi::log(
"ERROR: SQL generate error"
@@ -402,7 +402,10 @@ final class DibiTranslator
*/
private function delimite($value)
{
return $this->driver->delimite( dibi::substitute($value) );
if (strpos($value, ':') !== FALSE) {
$value = strtr($value, dibi::getSubst());
}
return $this->driver->delimite($value);
}