Changeset 21448


Ignore:
Timestamp:
2012/02/07 01:53:24 (9 years ago)
Author:
Seasoft
Message:

#515 (PHP 5.3.0対応)

  • POSIX 正規表現関数 -> PCRE 関数
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php

    r21441 r21448  
    237237     */ 
    238238    function sfChangeILIKE($sql){ 
    239         $changesql = eregi_replace("(ILIKE )", "LIKE ", $sql); 
     239        $changesql = preg_replace('/(^|[^\w])ILIKE([^\w]|$)/i', '$1LIKE$2', $sql); 
    240240        return $changesql; 
    241241    } 
     
    249249     */ 
    250250    function sfChangeRANDOM($sql){ 
    251         $changesql = eregi_replace("( RANDOM)", " RAND", $sql); 
     251        $changesql = preg_replace('/(^|[^\w])RANDOM\(/i', '$1RAND(', $sql); 
    252252        return $changesql; 
    253253    } 
     
    261261     */ 
    262262    function sfChangeTrunc($sql){ 
    263         $changesql = eregi_replace("( TRUNC)", " TRUNCATE", $sql); 
     263        $changesql = preg_replace('/(^|[^\w])TRUNC([^\w]|$)/i', '$1TRUNCATE$2', $sql); 
    264264        return $changesql; 
    265265    } 
Note: See TracChangeset for help on using the changeset viewer.