Skip to content

Commit

Permalink
DibiTranslator: added modifiers %sN & %iN, replacements for %sn & %in
Browse files Browse the repository at this point in the history
  • Loading branch information
dg authored and Majkl578 committed Jan 23, 2010
1 parent 85066b7 commit 7fc5e05
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dibi/libs/DibiTranslator.php
Expand Up @@ -332,10 +332,12 @@ public function formatValue($value, $modifier)
case 'b': // boolean
return $value === NULL ? 'NULL' : $this->driver->escape($value, $modifier);

case 'sn': // string or NULL
case 'sN': // string or NULL
case 'sn':
return $value == '' ? 'NULL' : $this->driver->escape($value, dibi::TEXT); // notice two equal signs

case 'in': // signed int or NULL
case 'iN': // signed int or NULL
case 'in': // deprecated
if ($value == '') $value = NULL;
// intentionally break omitted

Expand Down

0 comments on commit 7fc5e05

Please sign in to comment.