Merge "Improve error message for missing content model on import"
[lhc/web/wiklou.git] / includes / actions / Action.php
index bb6a4d5..6ddc596 100644 (file)
@@ -370,7 +370,7 @@ abstract class Action {
         * Returns the description that goes below the \<h1\> tag
         * @since 1.17
         *
-        * @return string
+        * @return string HTML
         */
        protected function getDescription() {
                return $this->msg( strtolower( $this->getName() ) )->escaped();
@@ -407,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();
+               }
+       }
 }