Index: branches/5.2.x/core/kernel/utility/http_query.php =================================================================== diff -u -N -r14244 -r14585 --- branches/5.2.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 14244) +++ branches/5.2.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 14585) @@ -1,6 +1,6 @@ Order = $order; - if (array_key_exists('HTTP_X_REQUESTED_WITH', $_SERVER) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { + if ( isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { // when AJAX request is made from jQuery, then create ajax variable, // so any logic based in it (like redirects) will not break down $_GET['ajax'] = 'yes'; @@ -805,9 +805,11 @@ function writeRequestLog($filename) { - $folder_path = dirname(FULL_PATH.'/'.$filename); - if (is_writable($folder_path)) { - $fp = fopen(FULL_PATH.'/'.$filename, 'a'); + $log_file = (defined('RESTRICTED') ? RESTRICTED : FULL_PATH) . '/' . $filename; + + if ( is_writable( dirname($log_file) ) ) { + $fp = fopen($log_file, 'a'); + if ($fp) { $session =& $this->Application->recallObject('Session'); $user_id = $session->GetField('PortalUserId');