[Mapbender-commits] r9429 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Apr 5 07:47:01 PDT 2016
Author: armin11
Date: 2016-04-05 07:47:01 -0700 (Tue, 05 Apr 2016)
New Revision: 9429
Modified:
trunk/mapbender/http/classes/class_wmc.php
trunk/mapbender/http/classes/class_wmcToXml.php
Log:
Bugfixes
Modified: trunk/mapbender/http/classes/class_wmc.php
===================================================================
--- trunk/mapbender/http/classes/class_wmc.php 2016-03-31 13:06:53 UTC (rev 9428)
+++ trunk/mapbender/http/classes/class_wmc.php 2016-04-05 14:47:01 UTC (rev 9429)
@@ -164,27 +164,29 @@
return false;
}
$this->createObjFromWMC_xml($doc);
- $sql = "SELECT wmc_timestamp, wmc_title, wmc_public, srs, minx, miny, maxx, maxy, wmc_has_local_data, wmc_local_data_size, wmc_local_data_public, uuid " .
- "FROM mb_user_wmc WHERE wmc_serial_id = $1 AND (fkey_user_id = $2 OR wmc_public = 1)";
+ $sql = "SELECT * from (SELECT wmc_timestamp, wmc_title, wmc_public, srs, minx, miny, maxx, maxy, wmc_has_local_data, wmc_local_data_size, wmc_local_data_public, uuid, fkey_user_id " .
+ "FROM mb_user_wmc WHERE wmc_serial_id = $1 AND (fkey_user_id = $2 OR wmc_public = 1)) as wmc_data INNER JOIN mb_user ON wmc_data.fkey_user_id = mb_user.mb_user_id";
$v = array($wmcId, Mapbender::session()->get("mb_user_id"));
$t = array("i", "i");
$res = db_prep_query($sql,$v,$t);
if(db_error()) { return false; }
- if($row = db_fetch_row($res)) {
+ if($row = db_fetch_assoc($res)) {
$this->wmc_id = $wmcId;
- $this->timestamp = $row[0];
- $this->title = $row[1];
- $this->public = $row[2];
- $this->wmc_srs = $row[3];
- $this->wmc_extent->minx = $row[4];
- $this->wmc_extent->miny = $row[5];
- $this->wmc_extent->maxx = $row[6];
- $this->wmc_extent->maxy = $row[7];
- $this->local_data_public = $row[10];
- $this->local_data_size = $row[9];
- $this->has_local_data = $row[8];
- $this->uuid = $row[11];
+ $this->timestamp = $row['wmc_timestamp'];
+ $this->title = $row['wmc_title'];
+ $this->public = $row['wmc_public'];
+ $this->wmc_srs = $row['srs'];
+ $this->wmc_extent->minx = $row['minx'];
+ $this->wmc_extent->miny = $row['miny'];
+ $this->wmc_extent->maxx = $row['maxx'];
+ $this->wmc_extent->maxy = $row['maxy'];
+ $this->local_data_public = $row['wmc_local_data_public'];
+ $this->local_data_size = $row['wmc_local_data_size'];
+ $this->has_local_data = $row['wmc_has_local_data'];
+ $this->uuid = $row['uuid'];
+ $this->wmc_contactperson = $row['mb_user_name'];
+ $this->wmc_contactemail = $row['mb_user_email'];
return true;
}
return false;
Modified: trunk/mapbender/http/classes/class_wmcToXml.php
===================================================================
--- trunk/mapbender/http/classes/class_wmcToXml.php 2016-03-31 13:06:53 UTC (rev 9428)
+++ trunk/mapbender/http/classes/class_wmcToXml.php 2016-04-05 14:47:01 UTC (rev 9429)
@@ -558,7 +558,7 @@
$this->wmc->wmc_contactvoicetelephone || $this->wmc->wmc_contactfacsimiletelephone) {
$e_contact = $this->doc->createElement("ContactInformation");
- $e_contact_person_primary = $this->wmc->createContactPersonPrimaryNode();
+ $e_contact_person_primary = $this->createContactPersonPrimaryNode();
if ($e_contact_person_primary !== null) {
$e_contact->appendChild($e_contact_person_primary);
}
More information about the Mapbender_commits
mailing list