*/
public static function getTitleFor( $name, $subpage = false, $fragment = '' ) {
$name = SpecialPageFactory::getLocalNameFor( $name, $subpage );
- if ( $name ) {
- return Title::makeTitle( NS_SPECIAL, $name, $fragment );
- } else {
- throw new MWException( "Invalid special page name \"$name\"" );
- }
+ return Title::makeTitle( NS_SPECIAL, $name, $fragment );
}
/**
* @see wfMessage
*/
public function msg( /* $args */ ) {
- // Note: can't use func_get_args() directly as second or later item in
- // a parameter list until PHP 5.3 or you get a fatal error.
- // Works fine as the first parameter, which appears elsewhere in the
- // code base. Sighhhh.
- $args = func_get_args();
- $message = call_user_func_array( array( $this->getContext(), 'msg' ), $args );
+ $message = call_user_func_array(
+ array( $this->getContext(), 'msg' ),
+ func_get_args()
+ );
// RequestContext passes context to wfMessage, and the language is set from
// the context, but setting the language for Message class removes the
// interface message status, which breaks for example usernameless gender
public function getFinalGroupName() {
global $wgSpecialPageGroups;
$name = $this->getName();
- $group = '-';
// Allow overbidding the group from the wiki side
$msg = $this->msg( 'specialpages-specialpagegroup-' . strtolower( $name ) )->inContentLanguage();