Pass 0 as 2nd parameter of an Article Constructor (2 cases)
authorSam Reed <reedy@users.mediawiki.org>
Thu, 6 Jan 2011 17:06:05 +0000 (17:06 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 6 Jan 2011 17:06:05 +0000 (17:06 +0000)
includes/api/ApiParse.php

index 2656638..a626c77 100644 (file)
@@ -95,7 +95,7 @@ class ApiParse extends ApiBase {
 
                                // If for some reason the "oldid" is actually the current revision, it may be cached
                                if ( $titleObj->getLatestRevID() === intval( $oldid ) )  {
-                                       $articleObj = new Article( $titleObj );
+                                       $articleObj = new Article( $titleObj, 0 );
 
                                        $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $text, $popts, $pageid ) ;
 
@@ -142,7 +142,7 @@ class ApiParse extends ApiBase {
                                }
                                $wgTitle = $titleObj;
 
-                               $articleObj = new Article( $titleObj );
+                               $articleObj = new Article( $titleObj, 0 );
                                if ( isset( $prop['revid'] ) ) {
                                        $oldid = $articleObj->getRevIdFetched();
                                }