diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-08-27 18:37:16 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-08-27 18:37:16 +0200 |
commit | 3b83c7fa74eb90e02317528dd672fa2afe457b77 (patch) | |
tree | a387712f1097465a00fcfb5765fa3c5d2e8d813e /lib | |
parent | ead7de6bff8daa4f501a2d63dea63b9966f2bd57 (diff) | |
download | nextcloud-server-3b83c7fa74eb90e02317528dd672fa2afe457b77.tar.gz nextcloud-server-3b83c7fa74eb90e02317528dd672fa2afe457b77.zip |
update now(), current_timestamp and backtick replacement
Diffstat (limited to 'lib')
-rw-r--r-- | lib/db.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/db.php b/lib/db.php index 5ef67202a10..4214451c85f 100644 --- a/lib/db.php +++ b/lib/db.php @@ -534,10 +534,9 @@ class OC_DB { $query = str_replace( '`', '"', $query ); $query = str_replace( 'NOW()', 'datetime(\'now\')', $query ); $query = str_replace( 'now()', 'datetime(\'now\')', $query ); - }elseif( $type == 'mysql' ){ - $query = str_replace( 'NOW()', 'CURRENT_TIMESTAMP', $query ); - $query = str_replace( 'now()', 'CURRENT_TIMESTAMP', $query ); - }elseif( $type == 'pgsql' || $type == 'oci' ){ + }elseif( $type == 'pgsql' ){ + $query = str_replace( '`', '"', $query ); + }elseif( $type == 'oci' ){ $query = str_replace( '`', '"', $query ); $query = str_replace( 'NOW()', 'CURRENT_TIMESTAMP', $query ); $query = str_replace( 'now()', 'CURRENT_TIMESTAMP', $query ); |