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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jan 3 10:02:48 EST 2008


Author: christoph
Date: 2008-01-03 10:02:48 -0500 (Thu, 03 Jan 2008)
New Revision: 1942

Modified:
   trunk/mapbender/http/classes/class_administration.php
Log:
changed some comments, according to phpdoc

Modified: trunk/mapbender/http/classes/class_administration.php
===================================================================
--- trunk/mapbender/http/classes/class_administration.php	2007-12-21 16:10:40 UTC (rev 1941)
+++ trunk/mapbender/http/classes/class_administration.php	2008-01-03 15:02:48 UTC (rev 1942)
@@ -48,13 +48,13 @@
     /**
      * sends an email via php mailer
      *
-     * @param <string> an email address for the "From"-field
-     * @param <string> the displayed name for the "From"-field
-     * @param <string> an email address for the "To"-field
-     * @param <string> the displayed name for the "From"-field
-     * @param <string> the text to be set as "Subject"
-     * @param <string> the text of the emails body
-     * @param <string> a reference to an error string
+     * @param string an email address for the "From"-field
+     * @param string the displayed name for the "From"-field
+     * @param string an email address for the "To"-field
+     * @param string the displayed name for the "From"-field
+     * @param string the text to be set as "Subject"
+     * @param string the text of the emails body
+     * @param string a reference to an error string
      */
 	function sendEmail($fromAddr, $fromName, $toAddr, $toName, $subject, $body, &$error_msg ){
 
@@ -111,7 +111,7 @@
     /**
      * returns a random password with numbers and chars both lowercase and uppercase (0-9a-zA-Z)
      *
-     * @return <string> the new password
+     * @return string the new password
      */
  	function getRandomPassword() {
 
@@ -137,8 +137,8 @@
     /**
      * returns the name of a mapbender user which owns the GUI identified by the passed over gui_id.
      *
-     * @param <string> the gui_id
-     * @return <integer> the user id of the owner
+     * @param string the gui_id
+     * @return integer the user id of the owner
      */
  	function getOwnerByGui($gui_id){
 		$sql = "(SELECT mb_user.mb_user_id";
@@ -197,8 +197,8 @@
     /**
      * returns the name of the user for the given userid.
      *
-     * @param <integer> the userid
-     * @return  the name if one row is found or false if none is foundd
+     * @param	integer		the userid
+     * @return 	string		the name if one row is found or false if none is foundd
      */
 	function getUserNameByUserId($userid){
 		$sql = "SELECT mb_user_name FROM mb_user ";
@@ -223,8 +223,8 @@
      * returns one or more userids from the given email or false,
      * if there is no record in the database matching the given email
      *
-     * @param <string> the email
-     * @return <mixed> returns an array of userids or false when no records matches
+     * @param	string	the email
+     * @return	mixed	an array of userids or false when no records matches
      */
  	function getUserIdByEmail($email){
 		$sql = "SELECT  mb_user_id FROM mb_user ";
@@ -251,8 +251,9 @@
      * this wms are selected. Afterwards for each of the guis the owners are
      * selected and stored within an array.
      *
-     * @param <integer> the wms_id
-     * @return <mixed> an array of user ids which use the wms in their guis (both for persona or group ownership)
+     * @param	integer		the wms_id
+     * @return	mixed		an array of user ids which use the wms in their guis 
+     * 						(both for persona or group ownership)
      */
 	function getOwnerByWms($wms_id){
 		// first get guis which deploy this wms.
@@ -320,8 +321,8 @@
     /**
      * 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?
+     * @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 ";
@@ -338,11 +339,12 @@
 	}
 
     /**
-     * deletes a WMC entry specified by wmc_id and user_id
+     * deletes a {@link http://www.mapbender.org/index.php/WMC 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.
+     * @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 ";
@@ -361,9 +363,9 @@
     /**
      * 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?
+     * @uses administration::guiExists()
+     * @param 	string $guiId	the name and id of the gui to insert.
+     * @return 	boolean			could the gui be inserted?
      */
 	function insertGui($guiId) {
 		if (!$this->guiExists($guiId)) {
@@ -381,8 +383,9 @@
     /**
      * 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
+     * @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 ";
@@ -400,8 +403,8 @@
     /**
      * returns an array of WMS for a given user id
      * @uses getGuisByOwner
-     * @param <integer> the user id
-     * @return <array> wms ids for the user
+     * @param integer $user_id		the user id
+     * @return integer[] 			wms ids for the user
      */
 	function getWmsByOwner($user_id){
 		$gui_list = $this->getGuisByOwner($user_id,true);
@@ -410,8 +413,8 @@
 
     /**
      * returns an array of WMS where the owner is the user with the passed user_id
-     * @param <integer> the user id
-     * @return <array> wms ids for the user
+     * @param integer	the user id
+     * @return array 	wms ids for the user
      */
 	function getWmsByWmsOwner($user_id){
 		$sql = "SELECT wms_id FROM wms WHERE wms_owner = $1";
@@ -428,8 +431,8 @@
     /**
      * returns an array of user which are associated with a wms
      *
-     * @param <integer> the wms id
-     * @return <array> user_ids for the wms
+     * @param integer	the wms id
+     * @return array	user_ids for the wms
      */
 	function getUserByWms($wms_id){
 		$sql = "SELECT fkey_gui_id FROM gui_wms WHERE fkey_wms_id = $1 GROUP BY fkey_gui_id";
@@ -481,8 +484,8 @@
     /**
      * selects the WMS-title for a given wms id.
      *
-     * @param <integer> the wms id
-     * @return <string|boolean> either the title of the wms as string or false when none exists
+     * @param integer 			the wms id
+     * @return string|boolean 	either the title of the wms as string or false when none exists
      */
 	function getWmsTitleByWmsId($id){
 		$sql = "SELECT wms_title FROM wms WHERE wms_id = $1 GROUP BY wms_title";
@@ -496,8 +499,8 @@
     /**
      * selects the Layer-title for a given layer id.
      *
-     * @param <integer> the wms id
-     * @return <string|boolean> either the title of the wms as string or false when none exists
+     * @param integer			the wms id
+     * @return string|boolean	either the title of the wms as string or false when none exists
      */
 	function getLayerTitleByLayerId($id){
 		$sql = "SELECT layer_title FROM layer WHERE layer_id = $1 GROUP BY layer_title";
@@ -511,8 +514,8 @@
     /**
      * selects the WMC for a given wmc_id.
      *
-     * @param <integer> the wms id
-     * @return <string|boolean> either the wmc as string or false when none exists
+     * @param integer			the wms id
+     * @return string|boolean	either the wmc as string or false when none exists
      */
 	function getWmcById($id){
 		$sql = "SELECT wmc FROM mb_user_wmc WHERE wmc_id = $1 ";
@@ -530,8 +533,8 @@
 
     /**
      * resets the login count of a given user to 0
-     * @param <integer> the user id
-     * @return <boolean> could the login count be reseted?
+     * @param integer	the user id
+     * @return boolean 	could the login count be reseted?
      */
 	function resetLoginCount($userId) {
 		// TODO: isn't mb_user_login_count a integer?
@@ -874,6 +877,7 @@
 			return $url;
 		}
 	}
+	
 	function getModulPermission($userID,$guiID,$elementID){
 		$g = $this->getGuisByPermission($userID,true);
 		if(in_array($guiID,$g)){
@@ -892,6 +896,7 @@
 			return false;
 		}
 	}
+	
 	function getLayerPermission($wms_id, $layer_name, $user_id){
 		$layer_id = $this->getLayerIdByLayerName($wms_id,$layer_name);
 		$array_guis = $this->getGuisByPermission($user_id,true);
@@ -917,6 +922,7 @@
 			return false;
 		}
 	}
+	
 	function getWmsPermission($wms_id, $user_id) {
 		$array_guis = $this->getGuisByPermission($user_id,true);
 		$v = array();
@@ -941,6 +947,7 @@
 			return false;
 		}
 	}
+	
 	function getLayerIdByLayerName($wms_id, $layer_name){
 		$sql = "SELECT layer_id FROM layer WHERE ";
 		$sql .= "fkey_wms_id = $1 AND layer_name = $2";
@@ -954,6 +961,7 @@
 			return false;
 		}
 	}
+	
 	function getWmsIdByWmsGetmap($getmap) {
 		$sql = "SELECT wms_id FROM wms WHERE ";
 		$sql .= "wms_getmap LIKE $1 LIMIT 1";
@@ -1019,8 +1027,8 @@
 	/**
 	 * identifies the Featureservices where the current user is owner
 	 * 
-	 * @param integer userid the user-ID of the current user
-	 * @return integer[] the IDs of the featureservices
+	 * @param integer 		userid the user-ID of the current user
+	 * @return integer[] 	the IDs of the featureservices
 	 */
 	 function getWfsByOwner($userid){
 	 	$sql = "SELECT wfs_id FROM wfs WHERE wfs_owner = $1";
@@ -1036,8 +1044,8 @@
 	 
 	 /** identifies the Conf-FeatureServices where the current user is owner
 	 * 
-	 * @param integer userid the user-ID of the current user
-	 * @return integer[] the IDs of the wfs_conf-table
+	 * @param integer 		userid the user-ID of the current user
+	 * @return integer[] 	the IDs of the wfs_conf-table
 	 */
 	 function getWfsConfByPermission($userid){
 	 	



More information about the Mapbender_commits mailing list