]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
check for a post
authorEvan Prodromou <evan@status.net>
Sun, 24 Oct 2010 19:04:12 +0000 (15:04 -0400)
committerEvan Prodromou <evan@status.net>
Sun, 24 Oct 2010 19:04:12 +0000 (15:04 -0400)
lib/action.php

index 01bb0f7e92bebe78bc50ae7eb7afad4f43bbc412..d8f139246633cba3dbff040621b014c266940113 100644 (file)
@@ -1354,4 +1354,15 @@ class Action extends HTMLOutputter // lawsuit
             $this->clientError(_('There was a problem with your session token.'));
         }
     }
+
+    /**
+     * Check if the current request is a POST
+     *
+     * @return boolean true if POST; otherwise false.
+     */
+
+    function isPost()
+    {
+        return ($_SERVER['REQUEST_METHOD'] == 'POST');
+    }
 }