]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/managedaction.php
Merge branch 'utf8mb4' into nightly
[quix0rs-gnu-social.git] / lib / managedaction.php
index 3df73731aeecaf0b52813b25afcd68f9a2095142..278131b7a6461db41501a8ad417ccfa09fc52874 100644 (file)
@@ -32,6 +32,20 @@ if (!defined('GNUSOCIAL')) { exit(1); }
 
 class ManagedAction extends Action
 {
+    protected function prepare(array $args=array())
+    {
+        if (!parent::prepare($args)) {
+            return false;
+        }
+        $this->doPreparation();
+        return true;
+    }
+
+    protected function doPreparation()
+    {
+        // pass by default
+    }
+
     /**
      * Handler method
      */
@@ -53,5 +67,6 @@ class ManagedAction extends Action
     protected function handlePost()
     {
         // This will only be run if the Action has the property canPost==true
+        assert($this->canPost);
     }
 }