Break long lines in job related files
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Mon, 25 Nov 2013 14:58:40 +0000 (15:58 +0100)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Mon, 25 Nov 2013 14:58:40 +0000 (15:58 +0100)
Change-Id: I827773efd59dcf5789abcaa025cc0a9184eb7fac

includes/job/jobs/AssembleUploadChunksJob.php
includes/job/jobs/DoubleRedirectJob.php
includes/job/jobs/PublishStashedFileJob.php

index fb5fb58..eff16b9 100644 (file)
@@ -48,7 +48,8 @@ class AssembleUploadChunksJob extends Job {
                                // with the session correctly. Note that being able to load
                                // the user does not necessarily mean the session was loaded.
                                // Most likely cause by suhosin.session.encrypt = On.
-                               $this->setLastError( "Error associating with user session. Try setting suhosin.session.encrypt = Off" );
+                               $this->setLastError( "Error associating with user session. " .
+                                       "Try setting suhosin.session.encrypt = Off" );
 
                                return false;
                        }
index 991b2eb..ab8aef9 100644 (file)
@@ -36,8 +36,10 @@ class DoubleRedirectJob extends Job {
 
        /**
         * Insert jobs into the job queue to fix redirects to the given title
-        * @param string $reason the reason for the fix, see message "double-redirect-fixed-<reason>"
-        * @param $redirTitle Title: the title which has changed, redirects pointing to this title are fixed
+        * @param string $reason the reason for the fix, see message
+        *   "double-redirect-fixed-<reason>"
+        * @param $redirTitle Title: the title which has changed, redirects
+        *   pointing to this title are fixed
         * @param bool $destTitle Not used
         */
        public static function fixRedirects( $reason, $redirTitle, $destTitle = false ) {
@@ -114,7 +116,8 @@ class DoubleRedirectJob extends Job {
                // Find the current final destination
                $newTitle = self::getFinalDestination( $this->redirTitle );
                if ( !$newTitle ) {
-                       wfDebug( __METHOD__ . ": skipping: single redirect, circular redirect or invalid redirect destination\n" );
+                       wfDebug( __METHOD__ .
+                               ": skipping: single redirect, circular redirect or invalid redirect destination\n" );
 
                        return true;
                }
@@ -203,7 +206,12 @@ class DoubleRedirectJob extends Job {
                                # No redirect from here, chain terminates
                                break;
                        } else {
-                               $dest = $title = Title::makeTitle( $row->rd_namespace, $row->rd_title, '', $row->rd_interwiki );
+                               $dest = $title = Title::makeTitle(
+                                       $row->rd_namespace,
+                                       $row->rd_title,
+                                       '',
+                                       $row->rd_interwiki
+                               );
                        }
                }
 
@@ -219,7 +227,8 @@ class DoubleRedirectJob extends Job {
         */
        function getUser() {
                if ( !self::$user ) {
-                       self::$user = User::newFromName( wfMessage( 'double-redirect-fixer' )->inContentLanguage()->text() );
+                       $username = wfMessage( 'double-redirect-fixer' )->inContentLanguage()->text();
+                       self::$user = User::newFromName( $username );
                        # User::newFromName() can return false on a badly configured wiki.
                        if ( self::$user && !self::$user->isLoggedIn() ) {
                                self::$user->addToDatabase();
index ba47cb9..88ac9cf 100644 (file)
@@ -48,7 +48,8 @@ class PublishStashedFileJob extends Job {
                                // with the session correctly. Note that being able to load
                                // the user does not necessarily mean the session was loaded.
                                // Most likely cause by suhosin.session.encrypt = On.
-                               $this->setLastError( "Error associating with user session. Try setting suhosin.session.encrypt = Off" );
+                               $this->setLastError( "Error associating with user session. " .
+                                       "Try setting suhosin.session.encrypt = Off" );
 
                                return false;
                        }