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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed May 9 07:58:04 EDT 2007


Author: marcjansen
Date: 2007-05-09 07:58:04 -0400 (Wed, 09 May 2007)
New Revision: 1310

Modified:
   trunk/mapbender/http/classes/class_administration.php
Log:
added PHPdoc comments

Modified: trunk/mapbender/http/classes/class_administration.php
===================================================================
--- trunk/mapbender/http/classes/class_administration.php	2007-05-09 11:30:47 UTC (rev 1309)
+++ trunk/mapbender/http/classes/class_administration.php	2007-05-09 11:58:04 UTC (rev 1310)
@@ -316,7 +316,12 @@
           return false;
         }
 	}
-
+    /**
+     * tests whether a gui with the passed gui_id exits and returns true or false.
+     * 
+     * @param <string> the gui_id to test
+     * @return <boolean> Does a Gui with the passed over gui_id exist?
+     */
 	function guiExists($id){
 		$sql = "SELECT * FROM gui WHERE gui_id = $1 ";
 		$v = array($id);
@@ -330,7 +335,14 @@
 			return false;
 		}
 	}
-
+    
+    /**
+     * deletes a WMC entry specified by wmc_id and user_id
+     * 
+     * @param <integer> the user_id
+     * @param <string> the wmc_id
+     * @return <boolean> Did the query run succesfull? This does not necessarily mean that an entry was deleted.
+     */
  	function deleteWmc($wmc_id, $user_id){
 		$sql = "DELETE FROM mb_user_wmc ";
 		$sql .= "WHERE fkey_user_id = $1 AND wmc_id = $2";
@@ -344,7 +356,14 @@
 			return false;
 		}
  	}
-
+    
+    /**
+     * inserts a gui with the specified gui_id, after checking the uniqueness of teh gui id.
+     * 
+     * @uses guiExists
+     * @param <string> the name and id of the gui to insert.
+     * @return <boolean> could the gui be inserted?
+     */
 	function insertGui($guiId) {
 		if (!$this->guiExists($guiId)) {
 			$sql = "INSERT INTO gui VALUES ($1, $2, '', '1')";
@@ -357,7 +376,13 @@
 		}
 		return false;
 	}
-
+    
+    /**
+     * deletes links between user and guis in gui_mb_user for a certain gui.
+     * 
+     * @param <string> the gui name
+     * @return <boolean> could the sql be executed without errors. This does not necessarily mean, that entries were deleted
+     */
 	function delAllUsersOfGui($guiId) {
 		$sql = "DELETE FROM gui_mb_user WHERE fkey_gui_id = $1 ";
 		$v = array($guiId);
@@ -370,7 +395,11 @@
 			return true;
 		}
 	}
-
+    
+    /**
+     * 
+     * @uses getGuisByOwner
+     */
 	function getWmsByOwner($user_id){
 		$gui_list = $this->getGuisByOwner($user_id,true);
 		return $this->getWmsByOwnGuis($gui_list);



More information about the Mapbender_commits mailing list