Fixing E_NOTICE
[lhc/web/wiklou.git] / includes / DatabaseOracle.php
index 7bb4e15..3848548 100644 (file)
@@ -2,8 +2,8 @@
 
 /**
  * This is the Oracle database abstraction layer.
+ * @addtogroup Database
  */
-
 class ORABlob {
        var $mData;
 
@@ -14,12 +14,13 @@ class ORABlob {
        function getData() {
                return $this->mData;
        }
-};
+}
 
-/*
+/**
  * 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
  */
 class ORAResult {
        private $rows;
@@ -83,8 +84,11 @@ class ORAResult {
                }
                return $ret;
        }
-};
+}
 
+/**
+ * @addtogroup Database
+ */
 class DatabaseOracle extends Database {
        var $mInsertId = NULL;
        var $mLastResult = NULL;
@@ -124,6 +128,9 @@ class DatabaseOracle extends Database {
        function implicitGroupby() {
                return false;
        }
+       function implicitOrderby() {
+               return false;
+       }
        function searchableIPs() {
                return true;
        }
@@ -385,7 +392,7 @@ class DatabaseOracle extends Database {
        }
 
        /**
-        * ORacle does not have a "USE INDEX" clause, so return an empty string
+        * Oracle does not have a "USE INDEX" clause, so return an empty string
         */
        function useIndexClause($index) {
                return '';
@@ -655,7 +662,7 @@ echo "error!\n";
 
                #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'] );
@@ -667,15 +674,24 @@ echo "error!\n";
        }
 
        public function setTimeout( $timeout ) {
-               /// @fixme no-op
+               // @todo fixme no-op
        }
 
        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;
+       }
 
 } // end DatabaseOracle class
 
-?>
+