[Mapbender-commits] r5944 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Apr 12 04:52:00 EDT 2010
Author: verenadiewald
Date: 2010-04-12 04:51:38 -0400 (Mon, 12 Apr 2010)
New Revision: 5944
Modified:
trunk/mapbender/http/plugins/jq_upload.js
trunk/mapbender/http/plugins/jq_upload.php
Log:
set ___ as separator for returnString -> taking _ as separator can lead to problems with underscores in directory names
Modified: trunk/mapbender/http/plugins/jq_upload.js
===================================================================
--- trunk/mapbender/http/plugins/jq_upload.js 2010-04-11 15:13:55 UTC (rev 5943)
+++ trunk/mapbender/http/plugins/jq_upload.js 2010-04-12 08:51:38 UTC (rev 5944)
@@ -41,7 +41,7 @@
clearInterval(t);
time = 0;
- var returnValueArray = returnValue.split("_");
+ var returnValueArray = returnValue.split("___");
var filename = returnValueArray[returnValueArray.length - 3];
var origFilename = window.frames[id+"_target"].filename;
var msg = "";
@@ -49,14 +49,14 @@
if (returnValue.match(/_finished/)) {
window.frames[id + "_target"].id = undefined;
if (typeof options.callback === "function") {
- var msgArray = returnValue.split("_");
+ var msgArray = returnValue.split("___");
msg = msgArray.pop();
options.callback({filename:filename,origFilename: origFilename}, true, msg);
}
}
else if (returnValue.match(/_cancelled/)) {
window.frames[id + "_target"].id = undefined;
- var msgArray = returnValue.split("_");
+ var msgArray = returnValue.split("___");
msg = msgArray.pop();
if (typeof options.callback === "function") {
options.callback(null, false, msg);
Modified: trunk/mapbender/http/plugins/jq_upload.php
===================================================================
--- trunk/mapbender/http/plugins/jq_upload.php 2010-04-11 15:13:55 UTC (rev 5943)
+++ trunk/mapbender/http/plugins/jq_upload.php 2010-04-12 08:51:38 UTC (rev 5944)
@@ -70,6 +70,7 @@
}
$serverFilename .= $extension;
$serverFullFilename = $uploadDir . "/" . $serverFilename;
+ $e = new mb_exception($serverFullFilename);
if (!$cancel) {
if (!copy($uploadedFile, $serverFullFilename)) {
$status = "cancelled";
@@ -92,7 +93,7 @@
<head>
<script type="text/javascript">
var id = "<?php
- echo $id . "_" . $serverFullFilename . "_" . $status . "_" . $message;
+ echo $id . "___" . $serverFullFilename . "___" . $status . "___" . $message;
?>";
var filename = "<?php echo $clientFilename; ?>";
</script>
More information about the Mapbender_commits
mailing list