"Reedy" posted a comment on MediaWiki.r108274.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/108274#c29081

Commit summary for MediaWiki.r108274:

* Added WikiPage to RequestContext and related so that it can be shared to 
avoid creating a new object each time and thus avoiding database queries to 
load the state of the object
* Added Article::getPage() as accessor to the WikiPage object so that it can be 
set in the context from MediaWiki::initializeArticle()
* Use it WikiPage::main() to call doViewUpdates()

I'm doing to this now so that I can revert r105790 and use the WikiPage object 
before the 1.19 release

Reedy's comment:

<pre>
+       /**
+        * Get the WikiPage object
+        *
+        * @since 1.19
+        * @return WikiPage
+        */
+       public function getWikiPage() {
+               if ( !is_null( $this->wikipage ) ) {
+                       return $this->wikipage;
+               } else {
+                       return $this->getContext()->getWikiPage();
+               }
+       }
</pre>

Shouldn't that be caching the result from $this->getContext()->getWikiPage() ?

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to