Merge "jquery.makeCollapsible: Remove useless debug logging"
[lhc/web/wiklou.git] / includes / filerepo / ForeignDBRepo.php
index 1865985..b38416f 100644 (file)
  */
 class ForeignDBRepo extends LocalRepo {
        # Settings
-       var $dbType, $dbServer, $dbUser, $dbPassword, $dbName, $dbFlags,
-               $tablePrefix, $hasSharedCache;
+       protected $dbType;
+       protected $dbServer;
+       protected $dbUser;
+       protected $dbPassword;
+       protected $dbName;
+       protected $dbFlags;
+       protected $tablePrefix;
+       protected $hasSharedCache;
 
        # Other stuff
-       var $dbConn;
-       var $fileFactory = array( 'ForeignDBFile', 'newFromTitle' );
-       var $fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' );
+       protected $dbConn;
+       protected $fileFactory = array( 'ForeignDBFile', 'newFromTitle' );
+       protected $fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' );
 
        /**
         * @param $info array|null
@@ -59,14 +65,16 @@ class ForeignDBRepo extends LocalRepo {
                        $this->dbConn = DatabaseBase::factory( $this->dbType,
                                array(
                                        'host' => $this->dbServer,
-                                       'user'   => $this->dbUser,
+                                       'user' => $this->dbUser,
                                        'password' => $this->dbPassword,
                                        'dbname' => $this->dbName,
                                        'flags' => $this->dbFlags,
-                                       'tablePrefix' => $this->tablePrefix
+                                       'tablePrefix' => $this->tablePrefix,
+                                       'foreign' => true,
                                )
                        );
                }
+
                return $this->dbConn;
        }
 
@@ -94,6 +102,7 @@ class ForeignDBRepo extends LocalRepo {
                if ( $this->hasSharedCache() ) {
                        $args = func_get_args();
                        array_unshift( $args, $this->dbName, $this->tablePrefix );
+
                        return call_user_func_array( 'wfForeignMemcKey', $args );
                } else {
                        return false;