When I have a Document (File Name) in my form and I upload a file with the name a+b.txt it still fails. I have been mentioning this since many many months and have given the solution several times.
Most of the other bugs (at least the ones that I found) seem to be fixed or circumvented.
It is still not fixed, the bug is due to the point that the sajax code has a bug.
The generated code is:
grid_filestorage_sajax.php (pieces removed due to length constrictions).
<?php
if (!isset($SAJAX_INCLUDED)) {
/*
* GLOBALS AND DEFAULTS
*
*/
$GLOBALS['sajax_version'] = '0.12';
$GLOBALS['sajax_debug_mode'] = 0;
$GLOBALS['sajax_export_list'] = array();
$GLOBALS['sajax_request_type'] = 'GET';
$GLOBALS['sajax_remote_uri'] = '';
$GLOBALS['sajax_failure_redirect'] = '';
..........
function sajax_do_call(func_name, args) {
var i, x, n;
var uri;
var post_data;
var target_id;
sajax_debug(\"in sajax_do_call()..\" + sajax_request_type + \"/\" + sajax_target_id);
target_id = sajax_target_id;
if (typeof(sajax_request_type) == \"undefined\" || sajax_request_type == \"\")
sajax_request_type = \"GET\";
uri = \"" . sajax_url_encode($sajax_remote_uri) . "\";
// NM
if (-1 != uri.indexOf(\"?\"))
uri = uri.substr(0, uri.indexOf(\"?\"));
// NM
if (sajax_request_type == \"GET\") {
if (uri.indexOf(\"?\") == -1)
uri += \"?rs=\" + escape(func_name);
else
uri += \"&rs=\" + escape(func_name);
uri += \"&rst=\" + escape(sajax_target_id);
uri += \"&rsrnd=\" + new Date().getTime();
for (i = 0; i < args.length-1; i++)
uri += \"&rsargs[]=\" + escape(args[i]);
post_data = null;
}
else if (sajax_request_type == \"POST\") {
post_data = \"rs=\" + escape(func_name);
post_data += \"&rst=\" + escape(sajax_target_id);
post_data += \"&rsrnd=\" + new Date().getTime();
for (i = 0; i < args.length-1; i++)
post_data = post_data + \"&rsargs[]=\" + escape(args[i]);
}
else {
alert(\"Illegal request type: \" + sajax_request_type);
}
x = sajax_init_object();
if (x == null) {
if (sajax_failure_redirect != \"\") {
location.href = sajax_failure_redirect;
return false;
} else {
sajax_debug(\"NULL sajax object for user agent:\
\" + navigator.userAgent);
return false;
}
} else {
x.open(sajax_request_type, uri, true);
// window.open(uri);
sajax_requests[sajax_requests.length] = x;
if (sajax_request_type == \"POST\") {
x.setRequestHeader(\"Method\", \"POST \" + uri + \" HTTP/1.1\");
x.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");
}
x.onreadystatechange = function() {
if (x.readyState != 4)
return;
sajax_debug(\"received \" + x.responseText);
var status;
var data;
var txt = x.responseText.replace(/^\s*|\s*$/g,\"\");
status = txt.charAt(0);
data = txt.substring(2);
if (status == \"\") {
// let's just assume this is a pre-response bailout and let it slide for now
} else if (status == \"-\")
alert(\"Error: \" + data);
else {
if (target_id != \"\")
document.getElementById(target_id).innerHTML = eval(data);
else {
try {
var callback;
var extra_data = false;
if (typeof args[args.length-1] == \"object\") {
callback = args[args.length-1].callback;
extra_data = args[args.length-1].extra_data;
} else {
callback = args[args.length-1];
}
callback(eval(data), extra_data);
} catch (e) {
sajax_debug(\"Caught error \" + e + \": Could not eval \" + data );
if (document.getElementById(\"id_fatal_error\") && data.lastIndexOf('Fatal error') > -1)
{
sc_ret_error = \"<table width=20%><tr><td>\" + data + \"</td></tr></table>\";
document.getElementById(\"id_fatal_error\").style.display = \"\";
document.getElementById(\"id_fatal_error\").innerHTML = sc_ret_error;
}
}
}
}
}
}
sajax_debug(func_name + \" uri = \" + uri + \"/post = \" + post_data);
x.send(post_data);
sajax_debug(func_name + \" waiting..\");
delete x;
return true;
}
";
return $html;
}
.....
?>