diff --git a/framework/helper.class.php b/framework/helper.class.php index b642c07d87..5e83930692 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -441,6 +441,18 @@ class helper return $string; } + /** + * Check is ajax request. + * + * @static + * @access public + * @return bool + */ + public static function isAjaxRequest() + { + return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'; + } + /** * Set viewType. *