[Mapbender-commits] r8983 - in trunk/mapbender/http: classes php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Jul 3 01:51:31 PDT 2014
Author: hwbllmnn
Date: 2014-07-03 01:51:31 -0700 (Thu, 03 Jul 2014)
New Revision: 8983
Modified:
trunk/mapbender/http/classes/class_wmc.php
trunk/mapbender/http/php/mod_savewmc_server.php
Log:
fixed update of wmcs with local data
Modified: trunk/mapbender/http/classes/class_wmc.php
===================================================================
--- trunk/mapbender/http/classes/class_wmc.php 2014-07-03 07:33:55 UTC (rev 8982)
+++ trunk/mapbender/http/classes/class_wmc.php 2014-07-03 08:51:31 UTC (rev 8983)
@@ -227,7 +227,6 @@
// set title
$this->wmc_title = $generalTitle;
-
if($mapObject[0]->kmls) {
$this->has_local_data = true;
$this->local_data_size = strlen(json_encode($mapObject[0]->kmls));
@@ -676,7 +675,6 @@
$tmpNode = $WMCDoc->importNode($NewKeywordList,true);
$general->appendChild($tmpNode);
}
-
$this->xml = $WMCDoc->saveXML();
db_begin();
@@ -698,8 +696,8 @@
if($row = db_fetch_row($res)) {
$sql = "UPDATE mb_user_wmc SET wmc = $1, wmc_timestamp = $2, abstract = $3, srs = $4, minx = $5, miny = $6,".
- " maxx = $7, maxy = $8, wmc_title = $9 WHERE fkey_user_id = $10 AND wmc_serial_id=$11 AND wmc_timestamp = $12 AND wmc_has_local_data = $13 ".
- "AND wmc_local_data_public = $14 AND wmc_local_data_size = $15;";
+ " maxx = $7, maxy = $8, wmc_title = $9, wmc_has_local_data = $13, ".
+ "wmc_local_data_public = $14, wmc_local_data_size = $15 WHERE fkey_user_id = $10 AND wmc_serial_id=$11 AND wmc_timestamp = $12;";
$v = array($this->xml, time(), $this->wmc_abstract, $this->wmc_srs, $this->wmc_extent->minx, $this->wmc_extent->miny,
$this->wmc_extent->maxx, $this->wmc_extent->maxy ,administration::convertOutgoingString($this->wmc_title), $this->userId, $this->wmc_id,$row[2],
$this->has_local_data, $this->local_data_public, $this->local_data_size);
Modified: trunk/mapbender/http/php/mod_savewmc_server.php
===================================================================
--- trunk/mapbender/http/php/mod_savewmc_server.php 2014-07-03 07:33:55 UTC (rev 8982)
+++ trunk/mapbender/http/php/mod_savewmc_server.php 2014-07-03 08:51:31 UTC (rev 8983)
@@ -161,9 +161,13 @@
}
// make a keyword array here
$kwds = explode(",",$attributes->keywords);
- foreach ($wmc->keyword as &$val) {
- $val = trim($val);
- }
+ $wmckwds = $wmc->keyword;
+ if(is_array($wmckwds)) {
+ foreach ($wmckwds as &$val) {
+ $val = trim($val);
+ }
+ }
+ $wmc->keyword = $wmckwds;
$wmc->wmc_keyword = $kwds;
$wmc->wmc_abstract = $attributes->abstract;
More information about the Mapbender_commits
mailing list