"Brion VIBBER" posted a comment on MediaWiki.r106567.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/106567#c28111

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

Brion VIBBER's comment:

What's all this meant to do? Is there a functional difference against the 
previous version, other than "Made maintenance scripts using it simply protect 
all actions returned by Title::getRestrictionTypes() instead of hardcoded 
'edit' and 'move'"? Is that a desirable thing? Can there be available 
protection types that we wouldn't want on by default?

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

Reply via email to