Mark a fixme comment in Oracle DB file for undefined variable
authorSam Reed <reedy@users.mediawiki.org>
Fri, 18 Feb 2011 22:58:02 +0000 (22:58 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Fri, 18 Feb 2011 22:58:02 +0000 (22:58 +0000)
Add documentation

includes/db/Database.php
includes/db/DatabaseMysql.php
includes/db/DatabaseOracle.php

index 6ea6770..8317664 100644 (file)
@@ -1364,12 +1364,15 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Makes an encoded list of strings from an array
-        * $mode:
+        * @param $a Array
+        * @param $mode
         *        LIST_COMMA         - comma separated, no field names
         *        LIST_AND           - ANDed WHERE clause (without the WHERE)
         *        LIST_OR            - ORed WHERE clause (without the WHERE)
         *        LIST_SET           - comma separated with field names, like a SET clause
         *        LIST_NAMES         - comma separated field names
+        *
+        * @return string
         */
        function makeList( $a, $mode = LIST_COMMA ) {
                if ( !is_array( $a ) ) {
@@ -2838,7 +2841,7 @@ class DBError extends MWException {
        /**
         * Construct a database error
         * @param $db Database object which threw the error
-        * @param $error A simple error message to be used for debugging
+        * @param $error String A simple error message to be used for debugging
         */
        function __construct( DatabaseBase &$db, $error ) {
                $this->db =& $db;
index a8af051..5e9c27f 100644 (file)
@@ -478,7 +478,6 @@ class DatabaseMysql extends DatabaseBase {
                $this->query( "SET sql_big_selects=$encValue", __METHOD__ );
        }
 
-
        /**
         * Determines if the last failure was due to a deadlock
         */
index ed8a068..5aeb773 100644 (file)
@@ -788,9 +788,9 @@ class DatabaseOracle extends DatabaseBase {
 
        # Returns the size of a text field, or -1 for "unlimited"
        function textFieldSize( $table, $field ) {
-               $fieldInfoData = $this->fieldInfo( $table, $field);
+               $fieldInfoData = $this->fieldInfo( $table, $field );
                if ( $fieldInfoData->type() == 'varchar' ) {
-                       $size = $row->size - 4;
+                       $size = $row->size - 4; // FIXME: $row is undefined
                } else {
                        $size = $row->size;
                }