[Mapbender-commits] r5313 - branches/2.6/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jan 13 06:05:38 EST 2010


Author: christoph
Date: 2010-01-13 06:05:38 -0500 (Wed, 13 Jan 2010)
New Revision: 5313

Modified:
   branches/2.6/http/classes/class_user.php
Log:


Modified: branches/2.6/http/classes/class_user.php
===================================================================
--- branches/2.6/http/classes/class_user.php	2010-01-13 11:05:18 UTC (rev 5312)
+++ branches/2.6/http/classes/class_user.php	2010-01-13 11:05:38 UTC (rev 5313)
@@ -101,15 +101,27 @@
 	
 	/** identifies the IDs of WFS confs where the user is owner
 	 * 
-	 * @param integer userid the user-ID of the current user
+	 * @param Array appIdArray [optional] restrict to certain applications
 	 * @return integer[] the IDs of the wfs_conf-table
 	 */
-	public function getWfsConfByPermission(){
+	public function getWfsConfByPermission () {
 		$userid = $this->id;
 	 	$guisByPer = array();
 //	 	1.
 		$adm = new administration();
 	 	$guisByPer = $adm->getGuisByPermission($userid, true);
+		
+		if (func_num_args() === 1) {
+			$arg1 = func_get_arg(0);
+			if (is_array($arg1)) {
+				$appIdArray = $arg1;
+				
+				$guisByPer = array_intersect($guisByPer, $appIdArray);
+			}
+		}
+		
+		$e = new mb_exception(serialize($guisByPer));
+		
 //	 	2. 
 		$ownWFSconfs = array();
 		if(count($guisByPer)>0){



More information about the Mapbender_commits mailing list