summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/request.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/request.php b/core/request.php
index f2fa4d9f..df8ea41a 100644
--- a/core/request.php
+++ b/core/request.php
@@ -48,4 +48,9 @@ class Request
{
return isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST';
}
+
+ public function isAjax()
+ {
+ return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest';
+ }
}