diff --git a/phpgwapi/inc/class.egw_framework.inc.php b/phpgwapi/inc/class.egw_framework.inc.php index 85ca4e31a7..50f23e5b66 100644 --- a/phpgwapi/inc/class.egw_framework.inc.php +++ b/phpgwapi/inc/class.egw_framework.inc.php @@ -81,14 +81,6 @@ abstract class egw_framework $GLOBALS['egw']->framework = $this; } $this->template_dir = '/phpgwapi/templates/'.$template; - - // for Ajax: no need to load the "standard" files, they are already loaded - // in fact jquery has a problem if loaded twice - if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') - { - self::$js_include_files = array(); - } - error_log(array2string($_SERVER)); } /** diff --git a/phpgwapi/inc/class.egw_json.inc.php b/phpgwapi/inc/class.egw_json.inc.php index c7dc028cfc..29acc84717 100644 --- a/phpgwapi/inc/class.egw_json.inc.php +++ b/phpgwapi/inc/class.egw_json.inc.php @@ -122,6 +122,10 @@ class egw_json_request $ajaxClass = CreateObject($appName.'.'.$className); } + // for Ajax: no need to load the "standard" javascript files, + // they are already loaded, in fact jquery has a problem if loaded twice + egw_framework::js_files(array()); + $parameters = translation::convert($parameters, 'utf-8'); call_user_func_array(array($ajaxClass, $functionName), $parameters);