"Nikerabbit" posted a comment on MediaWiki.r106567. URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/106567#c28464
Commit summary for MediaWiki.r106567: * Merged WikiPage::updateRestrictions() and Title::updateTitleProtection() into WikiPage::doUpdateRestrictions(); older methods still work for backward compatibility, but marked Title::updateTitleProtection() as deprecated and for removal in 1.20 since no extension calls it * Removed permissions check from WikiPage::doUpdateRestrictions() and left it for callers, resolves the todo from documentation * Inverted $expiry and $reason parameter between WikiPage::doUpdateRestrictions() and WikiPage::updateRestrictions() for more consistency; WikiPage::doUpdateRestrictions() also requires all parameters to be passed * WikiPage::doUpdateRestrictions() returns a Status object instead of bool for the older one; only possible error at the moment is a read-only database * Updated core calls to these functions * Made maintenance scripts using it simply protect all actions returned by Title::getRestrictionTypes() instead of hardcoded 'edit' and 'move' * This also means that protect.php can be used to protect a non-existing page for creation Nikerabbit's comment: For readers having literal values for parameters in calls to doUpdateRestrictions isn't very nice. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
