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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Feb 17 08:35:21 EST 2012


Author: armin11
Date: 2012-02-17 05:35:21 -0800 (Fri, 17 Feb 2012)
New Revision: 8257

Modified:
   trunk/mapbender/http/classes/class_user.php
Log:
Enhancement function to select owned metadata records from mapbender mb_metadata table. Needed for later upload shape files.

Modified: trunk/mapbender/http/classes/class_user.php
===================================================================
--- trunk/mapbender/http/classes/class_user.php	2012-02-17 10:34:37 UTC (rev 8256)
+++ trunk/mapbender/http/classes/class_user.php	2012-02-17 13:35:21 UTC (rev 8257)
@@ -739,7 +739,18 @@
 		}
 		return $wmsIdArray;
 	}
-	
+
+	public function getOwnedGeodata () {
+		$sql = "SELECT metadata_id FROM mb_metadata WHERE fkey_mb_user_id = $1";
+		$res = db_prep_query($sql, array($this->id), array("i"));
+		$geodataIdArray = array();
+		while ($row = db_fetch_array($res)) {
+			$e = new mb_exception("metadata_id: ".$row["metadata_id"]);
+			$geodataIdArray[]= $row["metadata_id"];
+		}
+		return $geodataIdArray;
+	}
+
 	public function isWmsOwner ($wms_id) {
 		// first get guis which deploy this wms.
         $sql = "SELECT fkey_gui_id FROM gui_wms WHERE fkey_wms_id = $1 GROUP BY fkey_gui_id";



More information about the Mapbender_commits mailing list