* @ingroup SpecialPage
*/
class SpecialPage {
-
// The canonical name of this special page
// Also used for the default <h1> heading, @see getDescription()
protected $mName;
* If you override execute(), you can recover the default behavior with userCanExecute()
* and displayRestrictionError()
*
- * @param string $name name of the special page, as seen in links and URLs
- * @param string $restriction user right required, e.g. "block" or "delete"
- * @param bool $listed whether the page is listed in Special:Specialpages
- * @param $function Callback|Bool: function called by execute(). By default it is constructed from $name
- * @param string $file file which is included by execute(). It is also constructed from $name by default
- * @param bool $includable whether the page can be included in normal pages
+ * @param string $name Name of the special page, as seen in links and URLs
+ * @param string $restriction User right required, e.g. "block" or "delete"
+ * @param bool $listed Whether the page is listed in Special:Specialpages
+ * @param Callback|Bool $function Function called by execute(). By default
+ * it is constructed from $name
+ * @param string $file File which is included by execute(). It is also
+ * constructed from $name by default
+ * @param bool $includable Whether the page can be included in normal pages
*/
public function __construct(
$name = '', $restriction = '', $listed = true,
/**
* Do the real work for the constructor, mainly so __call() can intercept
* calls to SpecialPage()
- * @param string $name name of the special page, as seen in links and URLs
- * @param string $restriction user right required, e.g. "block" or "delete"
- * @param bool $listed whether the page is listed in Special:Specialpages
- * @param $function Callback|Bool: function called by execute(). By default it is constructed from $name
- * @param string $file file which is included by execute(). It is also constructed from $name by default
- * @param bool $includable whether the page can be included in normal pages
+ * @param string $name Name of the special page, as seen in links and URLs
+ * @param string $restriction User right required, e.g. "block" or "delete"
+ * @param bool $listed Whether the page is listed in Special:Specialpages
+ * @param Callback|Bool $function Function called by execute(). By default
+ * it is constructed from $name
+ * @param string $file File which is included by execute(). It is also
+ * constructed from $name by default
+ * @param bool $includable Whether the page can be included in normal pages
*/
private function init( $name, $restriction, $listed, $function, $file, $includable ) {
$this->mName = $name;
if ( $this->mContext instanceof IContextSource ) {
return $this->mContext;
} else {
- wfDebug( __METHOD__ . " called and \$mContext is null. Return RequestContext::getMain(); for sanity\n" );
+ wfDebug( __METHOD__ . " called and \$mContext is null. " .
+ "Return RequestContext::getMain(); for sanity\n" );
return RequestContext::getMain();
}
}
* Play with the HTMLForm if you need to more substantially
* @param $form HTMLForm
*/
- protected function alterForm( HTMLForm $form ) {}
+ protected function alterForm( HTMLForm $form ) {
+ }
/**
* Get message prefix for HTMLForm
* confirmation message
* @since 1.22 Default is to do nothing
*/
- public function onSuccess() {}
+ public function onSuccess() {
+ }
/**
* Basic SpecialPage workflow: get a form, send it to the user; get some data back,
}
abstract class SpecialRedirectToSpecial extends RedirectSpecialPage {
+ // @todo FIXME: Visibility must be declared
var $redirName, $redirSubpage;
function __construct(
* - limit, offset: Useful for linking to history of one's own user page or
* user talk page. For example, this would be a link to "the last edit to your
* user talk page in the year 2010":
- * http://en.wikipedia.org/w/index.php?title=Special:MyPage&offset=20110000000000&limit=1&action=history
+ * http://en.wikipedia.org/wiki/Special:MyPage?offset=20110000000000&limit=1&action=history
*
* - feed: would allow linking to the current user's RSS feed for their user
* talk page: