[Mapbender-commits] r1148 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Feb 27 09:01:44 EST 2007
Author: christoph
Date: 2007-02-27 09:01:44 -0500 (Tue, 27 Feb 2007)
New Revision: 1148
Modified:
trunk/mapbender/http/php/mod_editWMS_Metadata.php
Log:
bugfix 1653160
WMS Metadata: Undefined variable: wms_id
Modified: trunk/mapbender/http/php/mod_editWMS_Metadata.php
===================================================================
--- trunk/mapbender/http/php/mod_editWMS_Metadata.php 2007-02-27 13:21:22 UTC (rev 1147)
+++ trunk/mapbender/http/php/mod_editWMS_Metadata.php 2007-02-27 14:01:44 UTC (rev 1148)
@@ -281,31 +281,26 @@
$wms_sql = "SELECT wms_id, wms_title FROM wms WHERE wms_owner = ".$_SESSION["mb_user_id"]. " ORDER BY wms_title";
$res_wms_sql = db_query($wms_sql);
#wms-selection
-
- ?>
- <br/>
- <select size='6' name='wmsList' style='width:300px' onchange='submit()'>
-
- <?php
-
- while($row = db_fetch_array($res_wms_sql))
- {
+
+ $selectBox = "";
+ while($row = db_fetch_array($res_wms_sql)) {
if ($adm->getWmsPermission($row["wms_id"], $_SESSION['mb_user_id'])) {
- echo "<option value='".$row["wms_id"]."' ";
- if(isset($_REQUEST['wmsList']) && $_REQUEST['wmsList'] == $row["wms_id"])
- {
- echo "selected";
- $count_wms = 0;
+ $selectBox .= "<option value='".$row["wms_id"]."' ";
+ if(isset($_REQUEST['wmsList']) && $_REQUEST['wmsList'] == $row["wms_id"]) {
+ $selectBox .= "selected";
}
- echo "> ".$row["wms_title"]."</option>";
+ $selectBox .= "> ".$row["wms_title"]."</option>";
}
}
- $count_wms++;
- ?>
- </select>
+
+ if ($selectBox != "") {
+ echo "<br/><select size='6' name='wmsList' style='width:300px' onchange='submit()'>".$selectBox."</select>";
+ }
+ else {
+ echo "<div>no wms owner.</div>";
+ die;
+ }
-
- <?php
if(isset($_REQUEST['wmsList']) == true && $_REQUEST['wmsList'] <>0)
editWMSByWMSID ($_REQUEST['wmsList']);
}
@@ -386,8 +381,7 @@
<tr/>
<tr>
<?php
- if (isset($selected_row["wms_timestamp"]) && $selected_row["wms_timestamp"] <> "")
- {
+ if (isset($selected_row["wms_timestamp"]) && $selected_row["wms_timestamp"] <> "") {
$datum = date("d.m.Y",$selected_row["wms_timestamp"]);
}
else $datum = ""
More information about the Mapbender_commits
mailing list