diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index c8566ac8772..c3e706ee3d2 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -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).