[Mapbender-commits] r4509 -
branches/mifan_dev/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Sun Aug 9 00:30:47 EDT 2009
Author: mifan
Date: 2009-08-09 00:30:46 -0400 (Sun, 09 Aug 2009)
New Revision: 4509
Modified:
branches/mifan_dev/mapbender/http/classes/class_csw.php
Log:
getcatalog from db
Modified: branches/mifan_dev/mapbender/http/classes/class_csw.php
===================================================================
--- branches/mifan_dev/mapbender/http/classes/class_csw.php 2009-08-08 06:45:35 UTC (rev 4508)
+++ branches/mifan_dev/mapbender/http/classes/class_csw.php 2009-08-09 04:30:46 UTC (rev 4509)
@@ -79,7 +79,18 @@
return $this->cat_version;
}
+ /**
+ *
+ * @param $request_type getrecords,describerecords..
+ * @param $request_method get,post,soap
+ * @return unknown_type
+ * @todo error check to see whether value is available in method
+ */
+ function getURLValue($request_type,$request_method){
+ return $this->cat_op_values[$request_type][$request_method];
+ }
+
public function getCatURL($type){
}
@@ -290,9 +301,30 @@
* @param $cat_id
* @return unknown_type
*/
- public function getCatObjFromDB($cat_id)
+ public function getCatObjFromDB($cat_id,$type)
{
-
+ $sql = "select * from cat where cat_id = $1";
+ $v = array($cat_id);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ while($row = db_fetch_array($res)){
+ $this->cat_id = $row['cat_id'];
+ $this->cat_version = $row['cat_version'];
+ $this->cat_abstract = administration::convertIncomingString($this->stripEndlineAndCarriageReturn($row['cat_abstract']));
+ $this->cat_title = administration::convertIncomingString($this->stripEndlineAndCarriageReturn($row['cat_title']));
+ $this->cat_upload_url = $row['cat_upload_url'];
+ $this->cat_getcapabilities_doc = $row['cat_getcapabilities_doc'];
+ $this->cat_id = $row['cat_id'];
+
+ //Get op values
+ $sql = "select * from cat_op_conf where fk_cat_id=$1";
+ $v = array($cat_id);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ while($subrow = db_fetch_array($res)){
+ $this->cat_op_values[$subrow['param_type']][$subrow['param_name']]=$subrow['param_value'];
+ }
+ }
}
/**
More information about the Mapbender_commits
mailing list