return $this->mRestriction;
}
- /**
- * Get the file which will be included by SpecialPage::execute() if your extension is
- * still stuck in the past and hasn't overridden the execute() method. No modern code
- * should want or need to know this.
- * @return string
- * @deprecated since 1.18
- */
- function getFile() {
- wfDeprecated( __METHOD__, '1.18' );
-
- return $this->mFile;
- }
-
// @todo FIXME: Decide which syntax to use for this, and stick to it
/**
* Whether this special page is listed in Special:SpecialPages
return array();
}
+ /**
+ * Helper function for implementations of prefixSearchSubpages() that
+ * filter the values in memory (as oppposed to making a query).
+ *
+ * @since 1.24
+ * @param string $search
+ * @param int $limit
+ * @param array $subpages
+ * @return string[]
+ */
+ protected static function prefixSearchArray( $search, $limit, array $subpages ) {
+ $escaped = preg_quote( $search, '/' );
+ return array_slice( preg_grep( "/^$escaped/i", $subpages ), 0, $limit );
+ }
+
/**
* Sets headers - this should be called from the execute() method of all derived classes!
*/
return $this->getContext()->getSkin();
}
- /**
- * Shortcut to get user's language
- *
- * @deprecated since 1.19 Use getLanguage instead
- * @return Language
- * @since 1.18
- */
- public function getLang() {
- wfDeprecated( __METHOD__, '1.19' );
-
- return $this->getLanguage();
- }
-
/**
* Shortcut to get user's language
*