Merge "Improve wfEscapeWikiText"
[lhc/web/wiklou.git] / includes / db / DatabaseOracle.php
index c0d3805..fca979b 100644 (file)
@@ -286,7 +286,7 @@ class DatabaseOracle extends DatabaseBase {
                wfSuppressWarnings();
                if ( $this->mFlags & DBO_PERSISTENT ) {
                        $this->mConn = oci_pconnect( $this->mUser, $this->mPassword, $this->mServer, $this->defaultCharset, $session_mode );
-               } else if ( $this->mFlags & DBO_DEFAULT ) {
+               } elseif ( $this->mFlags & DBO_DEFAULT ) {
                        $this->mConn = oci_new_connect( $this->mUser, $this->mPassword, $this->mServer, $this->defaultCharset, $session_mode );
                } else {
                        $this->mConn = oci_connect( $this->mUser, $this->mPassword, $this->mServer, $this->defaultCharset, $session_mode );
@@ -341,7 +341,7 @@ class DatabaseOracle extends DatabaseBase {
                $union_unique = ( preg_match( '/\/\* UNION_UNIQUE \*\/ /', $sql ) != 0 );
                // EXPLAIN syntax in Oracle is EXPLAIN PLAN FOR and it return nothing
                // you have to select data from plan table after explain
-               $explain_id = date( 'dmYHis' );
+               $explain_id = MWTimestamp::getLocalInstance()->format( 'dmYHis' );
 
                $sql = preg_replace( '/^EXPLAIN /', 'EXPLAIN PLAN SET STATEMENT_ID = \'' . $explain_id . '\' FOR', $sql, 1, $explain_count );