Merge "shared.css: Start vectorizing common icons"
[lhc/web/wiklou.git] / includes / specials / SpecialRedirect.php
index 5ea98d5..f05dacb 100644 (file)
@@ -27,6 +27,7 @@
  * the file for a given filename, or the page for a given revision id.
  *
  * @ingroup SpecialPage
+ * @since 1.22
  */
 class SpecialRedirect extends FormSpecialPage {
 
@@ -144,7 +145,7 @@ class SpecialRedirect extends FormSpecialPage {
         */
        function dispatch() {
                // the various namespaces supported by Special:Redirect
-               switch( $this->mType ) {
+               switch ( $this->mType ) {
                case 'user':
                        $url = $this->dispatchUser();
                        break;
@@ -165,6 +166,7 @@ class SpecialRedirect extends FormSpecialPage {
                }
                if ( !is_null( $this->mValue ) ) {
                        $this->getOutput()->setStatusCode( 404 );
+                       // Message: redirect-not-exists
                        $msg = $this->getMessagePrefix() . '-not-exists';
                        return Status::newFatal( $msg );
                }
@@ -175,6 +177,7 @@ class SpecialRedirect extends FormSpecialPage {
                $mp = $this->getMessagePrefix();
                $ns = array(
                        // subpage => message
+                       // Messages: redirect-user, redirect-revision, redirect-file
                        'user' => $mp . '-user',
                        'revision' => $mp . '-revision',
                        'file' => $mp . '-file',
@@ -182,17 +185,17 @@ class SpecialRedirect extends FormSpecialPage {
                $a = array();
                $a['type'] = array(
                        'type' => 'select',
-                       'label-message' => $mp . '-lookup',
+                       'label-message' => $mp . '-lookup', // Message: redirect-lookup
                        'options' => array(),
                        'default' => current( array_keys( $ns ) ),
                );
-               foreach( $ns as $n => $m ) {
+               foreach ( $ns as $n => $m ) {
                        $m = $this->msg( $m )->text();
                        $a['type']['options'][$m] = $n;
                }
                $a['value'] = array(
                        'type' => 'text',
-                       'label-message' => $mp . '-value'
+                       'label-message' => $mp . '-value' // Message: redirect-value
                );
                // set the defaults according to the parsed subpage path
                if ( !empty( $this->mType ) ) {
@@ -219,7 +222,8 @@ class SpecialRedirect extends FormSpecialPage {
        protected function alterForm( HTMLForm $form ) {
                /* display summary at top of page */
                $this->outputHeader();
-               /* tweak label on submit button */
+               // tweak label on submit button
+               // Message: redirect-submit
                $form->setSubmitTextMsg( $this->getMessagePrefix() . '-submit' );
                /* submit form every time */
                $form->setMethod( 'get' );