[fusion-commits] r1880 - trunk/widgets/Redline
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Jul 22 15:30:54 EDT 2009
Author: zjames
Date: 2009-07-22 15:30:54 -0400 (Wed, 22 Jul 2009)
New Revision: 1880
Modified:
trunk/widgets/Redline/Redline.php
Log:
closes #274 - reload html on upload error and display warning
Modified: trunk/widgets/Redline/Redline.php
===================================================================
--- trunk/widgets/Redline/Redline.php 2009-07-22 19:28:19 UTC (rev 1879)
+++ trunk/widgets/Redline/Redline.php 2009-07-22 19:30:54 UTC (rev 1880)
@@ -33,7 +33,6 @@
$action = $_POST['action'];
$file = $_GET['file'];
-
if (isset($file)) { // it's a uploaded file request
returnFile($file);
}
@@ -52,9 +51,8 @@
$fileUpload = false;
}
}
- else if (isset($action)){ echo "--> ".$_FILES['uploadedfile']['error']; exit(1);}
+ else if (isset($action)){ $noFile = 1;}
}
-
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
@@ -78,6 +76,8 @@
div.innerHTML = "<div id=\"uploadedFileName\" value=\"<?= $uploadedFilename ?>\"/>";
document.body.appendChild(div);
<? } ?>
+ <? if (isset($noFile)) { echo "alert('Please select a file.');"; } ?>
+
}
</script>
More information about the fusion-commits
mailing list