[Mapbender-commits] r8792 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Mar 4 05:54:28 PST 2014


Author: schaef
Date: 2014-03-04 05:54:28 -0800 (Tue, 04 Mar 2014)
New Revision: 8792

Modified:
   trunk/mapbender/http/classes/class_administration.php
   trunk/mapbender/http/classes/class_universal_wfs_factory.php
   trunk/mapbender/http/classes/class_universal_wms_factory.php
   trunk/mapbender/http/classes/class_wfs_factory.php
   trunk/mapbender/http/classes/class_wms_owsproxy_log.php
Log:
Minor bugfix for owsproxy calculation

Modified: trunk/mapbender/http/classes/class_administration.php
===================================================================
--- trunk/mapbender/http/classes/class_administration.php	2014-03-04 12:55:46 UTC (rev 8791)
+++ trunk/mapbender/http/classes/class_administration.php	2014-03-04 13:54:28 UTC (rev 8792)
@@ -1295,9 +1295,11 @@
 			$e = new mb_exception("class_log: Writing table mb_proxy_log failed.");
 			return false;
 		}
-        $myid = pg_last_oid($res);
-        $res_id = db_prep_query("SELECT log_id from mb_proxy_log where oid=$1",
-                array(intval(pg_last_oid($res))),array("i")) or die(db_error());
+        #$myid = pg_last_oid($res);
+        
+        #$res_id = db_prep_query("SELECT log_id from mb_proxy_log where oid=$1",
+        #        array(intval(pg_last_oid($res))),array("i")) or die(db_error());
+        $res_id= db_query("select currval('mb_proxy_log_log_id_seq') as log_id");
         if(pg_num_rows($res_id)){
             $row = db_fetch_array($res_id);
             $id = $row["log_id"];

Modified: trunk/mapbender/http/classes/class_universal_wfs_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_universal_wfs_factory.php	2014-03-04 12:55:46 UTC (rev 8791)
+++ trunk/mapbender/http/classes/class_universal_wfs_factory.php	2014-03-04 13:54:28 UTC (rev 8792)
@@ -45,8 +45,8 @@
 		$values = $admin->parseXml($xml);
 		
 		foreach ($values as $element) {
-			if($this->sepNameSpace(strtoupper($element[tag])) == "WFS_CAPABILITIES" && $element[type] == "open"){
-				return $element[attributes][version];
+			if($this->sepNameSpace(strtoupper($element['tag'])) == "WFS_CAPABILITIES" && $element['type'] == "open"){
+				return $element['attributes'][version];
 			}
 		}
 		throw new Exception("WFS version could not be determined from XML.");

Modified: trunk/mapbender/http/classes/class_universal_wms_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_universal_wms_factory.php	2014-03-04 12:55:46 UTC (rev 8791)
+++ trunk/mapbender/http/classes/class_universal_wms_factory.php	2014-03-04 13:54:28 UTC (rev 8792)
@@ -34,8 +34,8 @@
 		$values = $admin->parseXml($xml);
 		
 		foreach ($values as $element) {
-			if($this->sepNameSpace(strtoupper($element[tag])) == "WFS_CAPABILITIES" && $element[type] == "open"){
-				return $element[attributes][version];
+			if($this->sepNameSpace(strtoupper($element['tag'])) == "WFS_CAPABILITIES" && $element['type'] == "open"){
+				return $element['attributes'][version];
 			}
 		}
 		throw new Exception("WFS version could not be determined from XML.");

Modified: trunk/mapbender/http/classes/class_wfs_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_wfs_factory.php	2014-03-04 12:55:46 UTC (rev 8791)
+++ trunk/mapbender/http/classes/class_wfs_factory.php	2014-03-04 13:54:28 UTC (rev 8792)
@@ -41,8 +41,8 @@
 		$values = $admin->parseXml($xml);
 		
 		foreach ($values as $element) {
-			if(strtoupper($element[tag]) == "WFS_CAPABILITIES" && $element[type] == "open"){
-				return $element[attributes][version];
+			if(strtoupper($element['tag']) == "WFS_CAPABILITIES" && $element['type'] == "open"){
+				return $element['attributes'][version];
 			}
 		}
 		throw new Exception("WFS version could not be determined from XML.");

Modified: trunk/mapbender/http/classes/class_wms_owsproxy_log.php
===================================================================
--- trunk/mapbender/http/classes/class_wms_owsproxy_log.php	2014-03-04 12:55:46 UTC (rev 8791)
+++ trunk/mapbender/http/classes/class_wms_owsproxy_log.php	2014-03-04 13:54:28 UTC (rev 8792)
@@ -189,7 +189,7 @@
 #function=listServiceLogs&listType=user&   serviceType=wms&userId=xyz&timeFrom=2012-05-31T12:01&timeTo=2012-05-31T12:12
 #function=listServiceLogs&listType=user&   serviceType=wms&userId=xyz&timeFrom=2012-05-31T12:01&timeTo=2012-05-31T12:12&wmsId=xyz
         if($this->listType == "service"){
-            $selectColumns = " u.mb_user_id,u.mb_user_name,u.mb_user_department";
+            $selectColumns = " m.log_id,u.mb_user_id,u.mb_user_name,u.mb_user_department";
             $join = " INNER JOIN mb_user AS u  ON (u.mb_user_id = m.fkey_mb_user_id)";
             if($this->withContactData !== null && $this->withContactData == "1") {
                 $selectColumns .= ",u.mb_user_firstname,mb_user_lastname"
@@ -210,7 +210,7 @@
             $result = db_prep_query($sql,$v,$t);
             $this->readResult($result);
         } else if($this->listType == "user"){
-            $selectColumns = " w.wms_id,w.wms_title";
+            $selectColumns = " m.log_id,w.wms_id,w.wms_title";
             $join = "";
 //            $innerjoinContactData = "";
             if($this->withContactData !== null && $this->withContactData == "1") {



More information about the Mapbender_commits mailing list