Renamed confusing initial $status var in doEditContent()
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 8 Dec 2015 03:10:17 +0000 (19:10 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 8 Dec 2015 03:10:17 +0000 (19:10 -0800)
Change-Id: I22cad9eb3fb4040e5506b0cccd573871d108d257

includes/page/WikiPage.php

index eadabac..294a22c 100644 (file)
@@ -1690,19 +1690,19 @@ class WikiPage implements Page, IDBAccessObject {
                $flags = $this->checkFlags( $flags );
 
                // Trigger pre-save hook (using provided edit summary)
-               $status = Status::newGood( array() );
+               $hookStatus = Status::newGood( array() );
                $hook_args = array( &$this, &$user, &$content, &$summary,
-                                                       $flags & EDIT_MINOR, null, null, &$flags, &$status );
+                                                       $flags & EDIT_MINOR, null, null, &$flags, &$hookStatus );
                // Check if the hook rejected the attempted save
                if ( !Hooks::run( 'PageContentSave', $hook_args )
                        || !ContentHandler::runLegacyHooks( 'ArticleSave', $hook_args )
                ) {
-                       if ( $status->isOK() ) {
+                       if ( $hookStatus->isOK() ) {
                                // Hook returned false but didn't call fatal(); use generic message
-                               $status->fatal( 'edit-hook-aborted' );
+                               $hookStatus->fatal( 'edit-hook-aborted' );
                        }
 
-                       return $status;
+                       return $hookStatus;
                }
 
                $old_revision = $this->getRevision(); // current revision