[Mapbender-commits] r8525 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Dec 11 07:10:01 PST 2012
Author: armin11
Date: 2012-12-11 07:10:00 -0800 (Tue, 11 Dec 2012)
New Revision: 8525
Modified:
trunk/mapbender/http/classes/class_administration.php
Log:
New function to get all subscribers of a wms by wms_id
Modified: trunk/mapbender/http/classes/class_administration.php
===================================================================
--- trunk/mapbender/http/classes/class_administration.php 2012-12-11 15:09:27 UTC (rev 8524)
+++ trunk/mapbender/http/classes/class_administration.php 2012-12-11 15:10:00 UTC (rev 8525)
@@ -295,6 +295,29 @@
}
/**
+ * returns one or more subscribers for the given wm_id as an array.
+ *
+ * @param integer the wms_id
+ * @return mixed an array of user ids which have subscribed the wms
+ */
+ function getSubscribersByWms($wms_id){
+ $sql = "SELECT DISTINCT fkey_mb_user_id FROM mb_user_abo_ows WHERE fkey_wms_id = $1";
+ $v = array($wms_id);
+ $t = array('i');
+ $count = 0;
+ $res = db_prep_query($sql,$v,$t);
+ while($row = db_fetch_array($res)){
+ $user[$count] = $row["fkey_mb_user_id"];
+ $count++;
+ }
+ if ($count > 0) {
+ return $user;
+ } else {
+ return false;
+ }
+ }
+
+ /**
* returns one or more owners for the given wm_id. First all guis deploying
* this wms are selected. Afterwards for each of the guis the owners are
* selected and stored within an array.
More information about the Mapbender_commits
mailing list