From: Federico Leva Date: Wed, 4 Mar 2015 23:14:50 +0000 (+0100) Subject: Add help link to three other "minor" special pages X-Git-Tag: 1.31.0-rc.0~12061^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=9e60a2cc7e0660679ee69fa6896472729a5bd951;p=lhc%2Fweb%2Fwiklou.git Add help link to three other "minor" special pages Bug: T45591 Change-Id: If8efa314fbd8f7469aa018135ad0f611f8806b48 --- diff --git a/includes/specials/SpecialDiff.php b/includes/specials/SpecialDiff.php index 77d23173ca..799e526bfb 100644 --- a/includes/specials/SpecialDiff.php +++ b/includes/specials/SpecialDiff.php @@ -53,6 +53,7 @@ class SpecialDiff extends RedirectSpecialPage { $this->mAddedRedirectParams['diff'] = $parts[1]; } else { // Wrong number of parameters, bail out + $this->getOutput()->addHelpLink( 'Help:Diff' ); throw new ErrorPageError( 'nopagetitle', 'nopagetext' ); } diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php index 69436bf79d..b6f19ec065 100644 --- a/includes/specials/SpecialRandomInCategory.php +++ b/includes/specials/SpecialRandomInCategory.php @@ -68,6 +68,8 @@ class SpecialRandomInCategory extends FormSpecialPage { } protected function getFormFields() { + $this->getOutput()->addHelpLink( 'Help:RandomInCategory' ); + $form = array( 'category' => array( 'type' => 'text', diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index 7a350c701c..e0a964e862 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -374,10 +374,12 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { $userAllowed = true; // Messages: revdelete-selected-text, revdelete-selected-file, logdelete-selected - $this->getOutput()->wrapWikiMsg( "$1", array( $this->typeLabels['selected'], + $out = $this->getOutput(); + $out->wrapWikiMsg( "$1", array( $this->typeLabels['selected'], $this->getLanguage()->formatNum( count( $this->ids ) ), $this->targetObj->getPrefixedText() ) ); - $this->getOutput()->addHTML( "" ); // Explanation text $this->addUsageText(); @@ -413,7 +415,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { // Show form if the user can submit if ( $this->mIsAllowed ) { - $out = Xml::openElement( 'form', array( 'method' => 'post', + $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getPageTitle()->getLocalURL( array( 'action' => 'submit' ) ), 'id' => 'mw-revdel-form-revisions' ) ) . Xml::fieldset( $this->msg( 'revdelete-legend' )->text() ) . @@ -465,12 +467,12 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { array(), array( 'action' => 'edit' ) ); - $out .= Xml::tags( 'p', array( 'class' => 'mw-revdel-editreasons' ), $link ) . "\n"; + $form .= Xml::tags( 'p', array( 'class' => 'mw-revdel-editreasons' ), $link ) . "\n"; } } else { - $out = ''; + $form = ''; } - $this->getOutput()->addHTML( $out ); + $out->addHTML( $form ); } /**