User "Aaron Schulz" posted a comment on MediaWiki.r79518.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/79518#c18072
Commit summary:

* Modified Article::loadPageData() to use a slave database connection and 
pageDataFromTitle() instead of pageDataFromId() in the default case, as in 
Wiki.php (this also saves a query since the ID will be fetched with other 
fileds)
* Removed the loadPageData() call for the initial article in Wiki.php, will be 
triggered by the isRedirect() call 7 lines below if needed (this was not needed 
if $target is set by the InitializeArticleMaybeRedirect hook), but kept the 
second one (same as above, Article::exists() triggers Title::getArticleId() 
that would use one query to get id and a second one is needed to get the 
complete page data)
* Modified Article::fetchContent() to use common code (loadPageData()) and to 
only call it if really needed

Comment:

I like the idea here, but I worry if something calls an accessor of Article 
that needs DB_MASTER data.

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

Reply via email to