Merge "Deleting a page and then immediately create-protecting it caused a PHP Fatal...
[lhc/web/wiklou.git] / includes / job / jobs / PublishStashedFileJob.php
index 1276e3c..88ac9cf 100644 (file)
@@ -39,6 +39,7 @@ class PublishStashedFileJob extends Job {
                        $user = $context->getUser();
                        if ( !$user->isLoggedIn() ) {
                                $this->setLastError( "Could not load the author user from session." );
+
                                return false;
                        }
 
@@ -47,7 +48,9 @@ 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;
                        }
 
@@ -73,6 +76,7 @@ class PublishStashedFileJob extends Job {
                                        array( 'result' => 'Failure', 'stage' => 'publish', 'status' => $status )
                                );
                                $this->setLastError( "Could not verify upload." );
+
                                return false;
                        }
 
@@ -89,6 +93,7 @@ class PublishStashedFileJob extends Job {
                                        array( 'result' => 'Failure', 'stage' => 'publish', 'status' => $status )
                                );
                                $this->setLastError( $status->getWikiText() );
+
                                return false;
                        }
 
@@ -120,8 +125,10 @@ class PublishStashedFileJob extends Job {
                                )
                        );
                        $this->setLastError( get_class( $e ) . ": " . $e->getText() );
+
                        return false;
                }
+
                return true;
        }
 
@@ -130,6 +137,7 @@ class PublishStashedFileJob extends Job {
                if ( is_array( $info['params'] ) ) {
                        $info['params'] = array( 'filekey' => $info['params']['filekey'] );
                }
+
                return $info;
        }