diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-02-14 12:54:36 -0800 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-02-14 12:54:36 -0800 |
commit | 9058d398a7b9aac58ab4aa7379e13ca83c72281d (patch) | |
tree | 7aaa55510ab15435efc2f36cf5628f5763f3ce02 /lib/db.php | |
parent | 4320f23c87ab6b43a31b8dcb0c6e44127438f123 (diff) | |
parent | ffae6f4b847e96d691053300c355ab81edc6c1c8 (diff) | |
download | nextcloud-server-9058d398a7b9aac58ab4aa7379e13ca83c72281d.tar.gz nextcloud-server-9058d398a7b9aac58ab4aa7379e13ca83c72281d.zip |
Merge pull request #1662 from owncloud/style-cleanup
Style cleanup
Diffstat (limited to 'lib/db.php')
-rw-r--r-- | lib/db.php | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/lib/db.php b/lib/db.php index 51f7c7679d4..28923e48f0c 100644 --- a/lib/db.php +++ b/lib/db.php @@ -228,11 +228,12 @@ class OC_DB { // Prepare options array $options = array( - 'portability' => MDB2_PORTABILITY_ALL - MDB2_PORTABILITY_FIX_CASE, - 'log_line_break' => '<br>', - 'idxname_format' => '%s', - 'debug' => true, - 'quote_identifier' => true ); + 'portability' => MDB2_PORTABILITY_ALL - MDB2_PORTABILITY_FIX_CASE, + 'log_line_break' => '<br>', + 'idxname_format' => '%s', + 'debug' => true, + 'quote_identifier' => true + ); // Add the dsn according to the database type switch($type) { @@ -474,7 +475,8 @@ class OC_DB { * http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions037.htm */ if( $CONFIG_DBTYPE == 'pgsql' ) { //mysql support it too but sqlite doesn't - $content = str_replace( '<default>0000-00-00 00:00:00</default>', '<default>CURRENT_TIMESTAMP</default>', $content ); + $content = str_replace( '<default>0000-00-00 00:00:00</default>', + '<default>CURRENT_TIMESTAMP</default>', $content ); } file_put_contents( $file2, $content ); @@ -499,7 +501,8 @@ class OC_DB { // Die in case something went wrong if( $ret instanceof MDB2_Error ) { - OC_Template::printErrorPage( self::$MDB2->getDebugOutput().' '.$ret->getMessage() . ': ' . $ret->getUserInfo() ); + OC_Template::printErrorPage( self::$MDB2->getDebugOutput().' '.$ret->getMessage() . ': ' + . $ret->getUserInfo() ); } return true; @@ -541,7 +544,8 @@ class OC_DB { * http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions037.htm */ if( $CONFIG_DBTYPE == 'pgsql' ) { //mysql support it too but sqlite doesn't - $content = str_replace( '<default>0000-00-00 00:00:00</default>', '<default>CURRENT_TIMESTAMP</default>', $content ); + $content = str_replace( '<default>0000-00-00 00:00:00</default>', + '<default>CURRENT_TIMESTAMP</default>', $content ); } file_put_contents( $file2, $content ); $op = self::$schema->updateDatabase($file2, $previousSchema, array(), false); @@ -679,7 +683,8 @@ class OC_DB { $query = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $query ); }elseif( $type == 'pgsql' ) { $query = str_replace( '`', '"', $query ); - $query = str_ireplace( 'UNIX_TIMESTAMP()', 'cast(extract(epoch from current_timestamp) as integer)', $query ); + $query = str_ireplace( 'UNIX_TIMESTAMP()', 'cast(extract(epoch from current_timestamp) as integer)', + $query ); }elseif( $type == 'oci' ) { $query = str_replace( '`', '"', $query ); $query = str_ireplace( 'NOW()', 'CURRENT_TIMESTAMP', $query ); |