[Mapbender-commits] r5098 - in trunk/mapbender/http: php plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Dec 9 11:35:37 EST 2009
Author: kmq
Date: 2009-12-09 11:35:36 -0500 (Wed, 09 Dec 2009)
New Revision: 5098
Modified:
trunk/mapbender/http/php/mod_echo.php
trunk/mapbender/http/plugins/mb_resultList_SaveAsFile.js
Log:
small fix to upload
Modified: trunk/mapbender/http/php/mod_echo.php
===================================================================
--- trunk/mapbender/http/php/mod_echo.php 2009-12-09 15:12:39 UTC (rev 5097)
+++ trunk/mapbender/http/php/mod_echo.php 2009-12-09 16:35:36 UTC (rev 5098)
@@ -12,10 +12,9 @@
case "createFile":
$data = $ajaxResponse->getParameter('data');
$fileId = createFile($data);
+ $e = new mb_exception("fileid ".$fileId );
+ if($fileId == false){ throw new Exception("Could not create file");}
$url = "../tmp/$fileId";
- if ($fileid === false){
- throw new Exception("could not create file");
- }
$result = array('url'=>$url);
break;
@@ -46,7 +45,7 @@
function createFile($data){
$filename = sha1(date("Y-m-d-His".rand())).".gjson";
- $filepath = dirname(__FILE__)."/../../http/tmp/$filename";
+ $filepath = dirname(__FILE__)."/../tmp/$filename";
$e = new mb_exception( $filepath);
if (file_put_contents($filepath,$data) === false){
return false;
Modified: trunk/mapbender/http/plugins/mb_resultList_SaveAsFile.js
===================================================================
--- trunk/mapbender/http/plugins/mb_resultList_SaveAsFile.js 2009-12-09 15:12:39 UTC (rev 5097)
+++ trunk/mapbender/http/plugins/mb_resultList_SaveAsFile.js 2009-12-09 16:35:36 UTC (rev 5098)
@@ -12,6 +12,7 @@
$('#resultdownloader').css('display','none');
$('#resultdownloader').attr('src',result.url);
}else{
+ alert("could not create file on server: "+message);
}
More information about the Mapbender_commits
mailing list