From 69a1ecec9b4b7168fb570d2d07bcfaa0f29fc856 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 24 Oct 2010 15:04:12 -0400 Subject: [PATCH] check for a post --- lib/action.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/action.php b/lib/action.php index 01bb0f7e92..d8f1392466 100644 --- a/lib/action.php +++ b/lib/action.php @@ -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'); + } }