[Mapbender-commits] r4510 - branches/mifan_dev/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Aug 9 00:31:18 EDT 2009


Author: mifan
Date: 2009-08-09 00:31:18 -0400 (Sun, 09 Aug 2009)
New Revision: 4510

Modified:
   branches/mifan_dev/mapbender/http/php/mod_searchCatQueryBuilder_server.php
Log:


Modified: branches/mifan_dev/mapbender/http/php/mod_searchCatQueryBuilder_server.php
===================================================================
--- branches/mifan_dev/mapbender/http/php/mod_searchCatQueryBuilder_server.php	2009-08-09 04:30:46 UTC (rev 4509)
+++ branches/mifan_dev/mapbender/http/php/mod_searchCatQueryBuilder_server.php	2009-08-09 04:31:18 UTC (rev 4510)
@@ -24,7 +24,6 @@
 require_once(dirname(__FILE__)."/../classes/class_json.php");
 
 /*
- * get guis for user
  * get catalogs for gui
  * get get/post url for catalog
  * construct query on url via get/xml
@@ -33,12 +32,23 @@
  * show responses with cat-name in results	
  */
 
-function get_guis_for_user($user){
-	
-}
 
-function get_catalogs_for_gui($gui_array,$getrecords_type){
-	
+/**
+ * 
+ * @param $gui_id
+ * @param $getrecords_type
+ * @return array list of cats
+ */
+function get_catalogs_for_gui($gui_id,$getrecords_type){
+	$sql = "select fkey_cat_id from gui_cat where fkey_gui_id = $1";
+	$v = array($gui_id);
+	$t = array('s');
+	$res = db_prep_query($sql,$v,$t);
+	$list_of_cat = array();
+	while($row = db_fetch_array($res)){
+		array_push($list_of_cat,$row['fkey_cat_id']);
+	}
+	return $list_of_cat;
 }
 
 



More information about the Mapbender_commits mailing list