Merge "Pass user to FileRepo::getUploadStash"
[lhc/web/wiklou.git] / maintenance / Maintenance.php
index 1d558d2..9b98b20 100644 (file)
@@ -102,7 +102,7 @@ abstract class Maintenance {
        private $mDependantParameters = array();
 
        /**
-        * Used by getDD() / setDB()
+        * Used by getDB() / setDB()
         * @var DatabaseBase
         */
        private $mDb = null;
@@ -604,7 +604,7 @@ abstract class Maintenance {
                global $wgProfiler;
 
                $output = $this->getOption( 'profiler' );
-               if ( $output && is_array( $wgProfiler ) ) {
+               if ( $output && is_array( $wgProfiler ) && isset( $wgProfiler['class'] ) ) {
                        $class = $wgProfiler['class'];
                        $profiler = new $class(
                                array( 'sampling' => 1, 'output' => $output ) + $wgProfiler
@@ -944,8 +944,8 @@ abstract class Maintenance {
 
                $wgShowSQLErrors = true;
 
-               // @codingStandardsIgnoreStart Allow error supppression. wfSuppressWarnings()
-               // is not avaiable.
+               // @codingStandardsIgnoreStart Allow error suppression. wfSuppressWarnings()
+               // is not available.
                @set_time_limit( 0 );
                // @codingStandardsIgnoreStart
 
@@ -1073,7 +1073,7 @@ abstract class Maintenance {
         *
         * @return DatabaseBase
         */
-       protected function &getDB( $db, $groups = array(), $wiki = false ) {
+       protected function getDB( $db, $groups = array(), $wiki = false ) {
                if ( is_null( $this->mDb ) ) {
                        return wfGetDB( $db, $groups, $wiki );
                } else {
@@ -1086,7 +1086,7 @@ abstract class Maintenance {
         *
         * @param DatabaseBase $db Database object to be used
         */
-       public function setDB( &$db ) {
+       public function setDB( $db ) {
                $this->mDb = $db;
        }
 
@@ -1094,7 +1094,7 @@ abstract class Maintenance {
         * Lock the search index
         * @param DatabaseBase &$db
         */
-       private function lockSearchindex( &$db ) {
+       private function lockSearchindex( $db ) {
                $write = array( 'searchindex' );
                $read = array( 'page', 'revision', 'text', 'interwiki', 'l10n_cache', 'user' );
                $db->lockTables( $read, $write, __CLASS__ . '::' . __METHOD__ );
@@ -1104,7 +1104,7 @@ abstract class Maintenance {
         * Unlock the tables
         * @param DatabaseBase &$db
         */
-       private function unlockSearchindex( &$db ) {
+       private function unlockSearchindex( $db ) {
                $db->unlockTables( __CLASS__ . '::' . __METHOD__ );
        }
 
@@ -1113,7 +1113,7 @@ abstract class Maintenance {
         * Since the lock is low-priority, queued reads will be able to complete
         * @param DatabaseBase &$db
         */
-       private function relockSearchindex( &$db ) {
+       private function relockSearchindex( $db ) {
                $this->unlockSearchindex( $db );
                $this->lockSearchindex( $db );
        }
@@ -1184,7 +1184,7 @@ abstract class Maintenance {
         * We default as considering stdin a tty (for nice readline methods)
         * but treating stout as not a tty to avoid color codes
         *
-        * @param int $fd File descriptor
+        * @param mixed $fd File descriptor
         * @return bool
         */
        public static function posix_isatty( $fd ) {
@@ -1321,7 +1321,7 @@ abstract class LoggedUpdateMaintenance extends Maintenance {
        }
 
        /**
-        * Message to show the the update log was unable to log the completion of this update
+        * Message to show that the update log was unable to log the completion of this update
         * @return string
         */
        protected function updatelogFailedMessage() {