Add the other existing $skin.css/.js to the message files too to be consistent
[lhc/web/wiklou.git] / includes / DatabaseOracle.php
index 2b720df..8d2a675 100644 (file)
@@ -1,8 +1,12 @@
 <?php
+/**
+ * @ingroup Database
+ * @file
+ */
 
 /**
  * This is the Oracle database abstraction layer.
- * @addtogroup Database
+ * @ingroup Database
  */
 class ORABlob {
        var $mData;
@@ -17,10 +21,10 @@ class ORABlob {
 }
 
 /**
- * The oci8 extension is fairly weak and doesn't support oci_num_rows, among 
- * other things.  We use a wrapper class to handle that and other 
+ * The oci8 extension is fairly weak and doesn't support oci_num_rows, among
+ * other things.  We use a wrapper class to handle that and other
  * Oracle-specific bits, like converting column names back to lowercase.
- * @addtogroup Database
+ * @ingroup Database
  */
 class ORAResult {
        private $rows;
@@ -87,7 +91,7 @@ class ORAResult {
 }
 
 /**
- * @addtogroup Database
+ * @ingroup Database
  */
 class DatabaseOracle extends Database {
        var $mInsertId = NULL;
@@ -128,6 +132,9 @@ class DatabaseOracle extends Database {
        function implicitGroupby() {
                return false;
        }
+       function implicitOrderby() {
+               return false;
+       }
        function searchableIPs() {
                return true;
        }
@@ -201,7 +208,7 @@ class DatabaseOracle extends Database {
                        $e = oci_error($this->mConn);
                        $this->reportQueryError($e['message'], $e['code'], $sql, __FUNCTION__);
                }
-               
+
                if (oci_execute($stmt, $this->execFlags()) == false) {
                        $e = oci_error($stmt);
                        $this->reportQueryError($e['message'], $e['code'], $sql, __FUNCTION__);
@@ -364,7 +371,7 @@ class DatabaseOracle extends Database {
 
                oci_free_statement($stmt);
        }
-       
+
        function tableName( $name ) {
                # Replace reserved words with better ones
                switch( $name ) {
@@ -527,7 +534,7 @@ class DatabaseOracle extends Database {
        }
 
        function reportQueryError($error, $errno, $sql, $fname, $tempIgnore = false) {
-               # Ignore errors during error handling to avoid infinite 
+               # Ignore errors during error handling to avoid infinite
                # recursion
                $ignore = $this->ignoreErrors(true);
                ++$this->mErrorCount;
@@ -650,23 +657,23 @@ echo "error!\n";
 
                if ( isset( $options['GROUP BY'] ) ) $preLimitTail .= " GROUP BY {$options['GROUP BY']}";
                if ( isset( $options['ORDER BY'] ) ) $preLimitTail .= " ORDER BY {$options['ORDER BY']}";
-               
+
                if (isset($options['LIMIT'])) {
                //      $tailOpts .= $this->limitResult('', $options['LIMIT'],
-               //              isset($options['OFFSET']) ? $options['OFFSET'] 
+               //              isset($options['OFFSET']) ? $options['OFFSET']
                //              : false);
                }
 
                #if ( isset( $noKeyOptions['FOR UPDATE'] ) ) $tailOpts .= ' FOR UPDATE';
                #if ( isset( $noKeyOptions['LOCK IN SHARE MODE'] ) ) $tailOpts .= ' LOCK IN SHARE MODE';
-               if ( isset( $noKeyOptions['DISTINCT'] ) && isset( $noKeyOptions['DISTINCTROW'] ) ) $startOpts .= 'DISTINCT';
+               if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) $startOpts .= 'DISTINCT';
 
                if ( isset( $options['USE INDEX'] ) && ! is_array( $options['USE INDEX'] ) ) {
                        $useIndex = $this->useIndexClause( $options['USE INDEX'] );
                } else {
                        $useIndex = '';
                }
-               
+
                return array( $startOpts, $useIndex, $preLimitTail, $postLimitTail );
        }
 
@@ -675,11 +682,29 @@ echo "error!\n";
        }
 
        function ping() {
-               wfDebug( "Function ping() not written for DatabasePostgres.php yet");
+               wfDebug( "Function ping() not written for DatabaseOracle.php yet");
                return true;
        }
 
+       /**
+        * How lagged is this slave?
+        *
+        * @return int
+        */
+       public function getLag() {
+               # Not implemented for Oracle
+               return 0;
+       }
+
+       function setFakeSlaveLag() {}
+       function setFakeMaster() {}
 
-} // end DatabaseOracle class
+       function getDBname() {
+               return $this->mDBname;
+       }
+
+       function getServer() {
+               return $this->mServer;
+       }
 
-?>
+} // end DatabaseOracle class