Merge "WikiPage: Remove unused protected method flattenRestrictions()"

This commit is contained in:
jenkins-bot 2019-10-08 20:49:01 +00:00 committed by Gerrit Code Review
commit bda408fa22

View file

@ -2536,30 +2536,6 @@ class WikiPage implements Page, IDBAccessObject {
return trim( $protectDescriptionLog );
}
/**
* Take an array of page restrictions and flatten it to a string
* suitable for insertion into the page_restrictions field.
*
* @param string[] $limit
*
* @throws MWException
* @return string
*/
protected static function flattenRestrictions( $limit ) {
if ( !is_array( $limit ) ) {
throw new MWException( __METHOD__ . ' given non-array restriction set' );
}
$bits = [];
ksort( $limit );
foreach ( array_filter( $limit ) as $action => $restrictions ) {
$bits[] = "$action=$restrictions";
}
return implode( ':', $bits );
}
/**
* Determines if deletion of this page would be batched (executed over time by the job queue)
* or not (completed in the same request as the delete call).