summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2012-08-27 18:37:16 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2012-08-27 18:37:16 +0200
commit3b83c7fa74eb90e02317528dd672fa2afe457b77 (patch)
treea387712f1097465a00fcfb5765fa3c5d2e8d813e /lib
parentead7de6bff8daa4f501a2d63dea63b9966f2bd57 (diff)
downloadnextcloud-server-3b83c7fa74eb90e02317528dd672fa2afe457b77.tar.gz
nextcloud-server-3b83c7fa74eb90e02317528dd672fa2afe457b77.zip
update now(), current_timestamp and backtick replacement
Diffstat (limited to 'lib')
-rw-r--r--lib/db.php7
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 );