Merge "jquery.makeCollapsible: No tabindex="0" for default buttons"
[lhc/web/wiklou.git] / includes / db / DatabaseMssql.php
index 1d05bf6..be01f1a 100644 (file)
@@ -1004,6 +1004,11 @@ class DatabaseMssql extends DatabaseBase {
                        return false;
                }
 
+               if ( $schema === false ) {
+                       global $wgDBmwschema;
+                       $schema = $wgDBmwschema;
+               }
+
                $res = $this->query( "SELECT 1 FROM INFORMATION_SCHEMA.TABLES
                        WHERE TABLE_TYPE = 'BASE TABLE'
                        AND TABLE_SCHEMA = '$schema' AND TABLE_NAME = '$table'" );
@@ -1295,9 +1300,6 @@ class DatabaseMssql extends DatabaseBase {
                        : array();
        }
 
-       /**
-        * @void
-        */
        private function populateColumnCaches() {
                $res = $this->select( 'INFORMATION_SCHEMA.COLUMNS', '*',
                        array(
@@ -1344,7 +1346,7 @@ class DatabaseMssql extends DatabaseBase {
                        // Used internally, we want the schema split off from the table name and returned
                        // as a list with 3 elements (database, schema, table)
                        $table = explode( '.', $table );
-                       if ( count( $table ) == 2 ) {
+                       while ( count( $table ) < 3 ) {
                                array_unshift( $table, false );
                        }
                }