Merge "SpecialMovepage: Convert form to use OOUI controls"
[lhc/web/wiklou.git] / includes / api / ApiBase.php
index 754c0ed..d53797b 100644 (file)
@@ -345,6 +345,22 @@ abstract class ApiBase extends ContextSource {
                return null;
        }
 
+       /**
+        * Returns data for HTTP conditional request mechanisms.
+        *
+        * @since 1.26
+        * @param string $condition Condition being queried:
+        *  - last-modified: Return a timestamp representing the maximum of the
+        *    last-modified dates for all resources involved in the request. See
+        *    RFC 7232 § 2.2 for semantics.
+        *  - etag: Return an entity-tag representing the state of all resources involved
+        *    in the request. Quotes must be included. See RFC 7232 § 2.3 for semantics.
+        * @return string|boolean|null As described above, or null if no value is available.
+        */
+       public function getConditionalRequestData( $condition ) {
+               return null;
+       }
+
        /**@}*/
 
        /************************************************************************//**
@@ -2870,6 +2886,16 @@ abstract class ApiBase extends ContextSource {
                return $this->getResult()->getData();
        }
 
+       /**
+        * Call wfTransactionalTimeLimit() if this request was POSTed
+        * @since 1.26
+        */
+       protected function useTransactionalTimeLimit() {
+               if ( $this->getRequest()->wasPosted() ) {
+                       wfTransactionalTimeLimit();
+               }
+       }
+
        /**@}*/
 }