From fb26cc9375ce9ef8df748eb473eb6e58884421c6 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Mon, 10 Mar 2014 16:28:47 +0200 Subject: a lot of enhancements related to tags: tags list is now sorted, shows number of articles, autocomplete added according to #477, #542 --- inc/poche/Tools.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) mode change 100644 => 100755 inc/poche/Tools.class.php (limited to 'inc/poche/Tools.class.php') diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php old mode 100644 new mode 100755 index eeb101b4..ad451fc6 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -311,4 +311,14 @@ class Tools return json_decode($json, true); } + + /** + * Returns whether we handle an AJAX (XMLHttpRequest) request. + * @return boolean whether we handle an AJAX (XMLHttpRequest) request. + */ + public static function isAjaxRequest() + { + return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH']==='XMLHttpRequest'; + } + } -- cgit v1.2.3