diff options
Diffstat (limited to 'inc/poche/Tools.class.php')
-rwxr-xr-x[-rw-r--r--] | inc/poche/Tools.class.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index eeb101b4..ad451fc6 100644..100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php | |||
@@ -311,4 +311,14 @@ class Tools | |||
311 | 311 | ||
312 | return json_decode($json, true); | 312 | return json_decode($json, true); |
313 | } | 313 | } |
314 | |||
315 | /** | ||
316 | * Returns whether we handle an AJAX (XMLHttpRequest) request. | ||
317 | * @return boolean whether we handle an AJAX (XMLHttpRequest) request. | ||
318 | */ | ||
319 | public static function isAjaxRequest() | ||
320 | { | ||
321 | return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH']==='XMLHttpRequest'; | ||
322 | } | ||
323 | |||
314 | } | 324 | } |