Merge "Don't check namespace in SpecialWantedtemplates"
[lhc/web/wiklou.git] / includes / actions / Action.php
index 79e859a..43f03c3 100644 (file)
@@ -386,7 +386,9 @@ abstract class Action {
         */
        public function addHelpLink( $to, $overrideBaseUrl = false ) {
                global $wgContLang;
-               $msg = wfMessage( $wgContLang->lc( $this->getActionName() ) . '-helppage' );
+               $msg = wfMessage( $wgContLang->lc(
+                       Action::getActionName( $this->getContext() )
+                       ) . '-helppage' );
 
                if ( !$msg->isDisabled() ) {
                        $helpUrl = Skin::makeUrl( $msg->plain() );
@@ -405,4 +407,14 @@ abstract class Action {
         * @throws ErrorPageError
         */
        abstract public function show();
+
+       /**
+        * Call wfTransactionalTimeLimit() if this request was POSTed
+        * @since 1.26
+        */
+       protected function useTransactionalTimeLimit() {
+               if ( $this->getRequest()->wasPosted() ) {
+                       wfTransactionalTimeLimit();
+               }
+       }
 }