X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialLog.php;h=ced5d25453bc176f36fe0b682b3ea540f1a67b72;hb=7ae68dcfb9f7a4e8359c1eeba1bed4e81ff1143e;hp=dd5ab939a0f9b9b978d8561e041c14985b280a93;hpb=bd2a78a159ce6d9f7b27fd75d05570228b44c3cb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialLog.php b/includes/specials/SpecialLog.php index dd5ab939a0..ced5d25453 100644 --- a/includes/specials/SpecialLog.php +++ b/includes/specials/SpecialLog.php @@ -80,7 +80,9 @@ class SpecialLog extends SpecialPage { $type = $opts->getValue( 'type' ); if ( !LogPage::isLogType( $type ) ) { $opts->setValue( 'type', '' ); - } elseif ( isset( $wgLogRestrictions[$type] ) && !$this->getUser()->isAllowed( $wgLogRestrictions[$type] ) ) { + } elseif ( isset( $wgLogRestrictions[$type] ) + && !$this->getUser()->isAllowed( $wgLogRestrictions[$type] ) + ) { throw new PermissionsError( $wgLogRestrictions[$type] ); } @@ -113,6 +115,21 @@ class SpecialLog extends SpecialPage { $this->show( $opts, $qc ); } + /** + * Return an array of subpages beginning with $search that this special page will accept. + * + * @param string $search Prefix to search for + * @param integer $limit Maximum number of results to return + * @return string[] Matching subpages + */ + public function prefixSearchSubpages( $search, $limit = 10 ) { + global $wgLogTypes; + $subpages = $wgLogTypes; + $subpages[] = 'all'; + sort( $subpages ); + return self::prefixSearchArray( $search, $limit, $subpages ); + } + private function parseParams( FormOptions $opts, $par ) { global $wgLogTypes;