[fusion-commits] r2713 - trunk/widgets/Redline
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu May 23 20:54:15 PDT 2013
Author: jng
Date: 2013-05-23 20:54:15 -0700 (Thu, 23 May 2013)
New Revision: 2713
Modified:
trunk/widgets/Redline/uploadmarkup.php
Log:
#565: The shortcut UI that's enabled by the 2 new extension parameters could be bypassed once a redline data store has been uploaded. This submission fixes that hole.
Modified: trunk/widgets/Redline/uploadmarkup.php
===================================================================
--- trunk/widgets/Redline/uploadmarkup.php 2013-05-23 07:51:00 UTC (rev 2712)
+++ trunk/widgets/Redline/uploadmarkup.php 2013-05-24 03:54:15 UTC (rev 2713)
@@ -14,7 +14,23 @@
$errorMsg = null;
$errorDetail = null;
+
+ $defaultFormat = null;
+ $defaultGeomType = null;
+ if (array_key_exists("REDLINEFORMAT", $args) && array_key_exists("REDLINEGEOMTYPE", $args)) {
+ if (strcmp($args["REDLINEFORMAT"], "SDF") == 0) {
+ $defaultFormat = $args["REDLINEFORMAT"];
+ $defaultGeomType = $args["REDLINEGEOMTYPE"];
+ } else if (strcmp($args["REDLINEFORMAT"], "SHP") == 0) {
+ $defaultFormat = $args["REDLINEFORMAT"];
+ $defaultGeomType = $args["REDLINEGEOMTYPE"];
+ } else if (strcmp($args["REDLINEFORMAT"], "SQLite") == 0) {
+ $defaultFormat = $args["REDLINEFORMAT"];
+ $defaultGeomType = $args["REDLINEGEOMTYPE"];
+ }
+ }
+
SetLocalizedFilesPath(GetLocalizationPath());
if(isset($_REQUEST['LOCALE'])) {
$locale = $_REQUEST['LOCALE'];
@@ -94,6 +110,10 @@
<input type="hidden" name="MARKUPCOMMAND" id="cmdType" value="<?= MarkupCommand::Upload ?>" />
<input type="hidden" name="MAPNAME" id="MAPNAME" value="<?= $args["MAPNAME"] ?>" />
<input type="hidden" name="SESSION" id="SESSION" value="<?= $args["SESSION"] ?>" />
+ <? if ($defaultFormat != null && $defaultGeomType != null) { ?>
+ <input name="REDLINEFORMAT" type="hidden" value="<?= $defaultFormat ?>" />
+ <input name="REDLINEGEOMTYPE" type="hidden" value="<?= $defaultGeomType ?>" />
+ <? } ?>
</td>
</tr>
<tr><td colspan="2" height="2px"></td></tr>
More information about the fusion-commits
mailing list