Ver Fonte

Misc Adherents PHPDoc corrections

Marcos García de La Fuente há 10 anos atrás
pai
commit
157a6e109e

+ 1 - 1
htdocs/adherents/admin/adherent.php

@@ -219,7 +219,7 @@ if ($conf->facture->enabled)
 		print '<input type="hidden" name="constname" value="ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS">';
 		print '<tr '.$bc[$var].'><td>'.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").'</td>';
 		print '<td>';
-		print $form->select_produits($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS, 'constvalue_ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS');
+		$form->select_produits($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS, 'constvalue_ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS');
 		print '</td><td align="center" width="80">';
 		print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
 		print '</td>';

+ 4 - 0
htdocs/adherents/canvas/actions_adherentcard_common.class.php

@@ -27,6 +27,10 @@
  */
 abstract class ActionsAdherentCardCommon
 {
+    /**
+     * Database handler
+     * @var DoliDB
+     */
     var $db;
     var $dirmodule;
     var $targetmodule;

+ 3 - 3
htdocs/adherents/card.php

@@ -1159,7 +1159,7 @@ else
 		print '<tr><td>'.$langs->trans("LinkedToDolibarrUser").'</td><td colspan="2" class="valeur">';
 		if ($object->user_id)
 		{
-			print $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none');
+			$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none');
 		}
 		else print $langs->trans("NoDolibarrAccess");
 		print '</td></tr>';
@@ -1516,13 +1516,13 @@ else
 		print '</td><td colspan="2" class="valeur">';
 		if ($action == 'editlogin')
 		{
-			print $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid','');
+			$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid','');
 		}
 		else
 		{
 			if ($object->user_id)
 			{
-				print $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none');
+				$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none');
 			}
 			else print $langs->trans("NoDolibarrAccess");
 		}

+ 2 - 2
htdocs/adherents/card_subscriptions.php

@@ -674,13 +674,13 @@ if ($rowid)
          {
          $include=array($object->user_id,$user->id);
          }*/
-        print $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid','');
+        $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid','');
     }
     else
     {
         if ($object->user_id)
         {
-            print $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none');
+            $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none');
         }
         else print $langs->trans("NoDolibarrAccess");
     }

+ 0 - 4
htdocs/adherents/class/adherent.class.php

@@ -641,10 +641,6 @@ class Adherent extends CommonObject
      */
     function update_end_date($user)
     {
-        global $conf, $langs;
-
-        $error=0;
-
         $this->db->begin();
 
         // Search for last subscription id and end date

+ 7 - 0
htdocs/adherents/class/adherent_type.class.php

@@ -36,6 +36,13 @@ class AdherentType extends CommonObject
     public $element = 'adherent_type';
 
     var $id;
+
+    /**
+     * @var int
+     * @deprecated Use rowid
+     */
+    public $ref;
+
     var $libelle;
     var $statut;
     var $cotisation;  // Soumis a la cotisation

+ 1 - 1
htdocs/adherents/list.php

@@ -152,7 +152,7 @@ $nbtotalofrecords = 0;
 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
 {
 	$resql = $db->query($sql);
-	if ($resql) $nbtotalofrecords = $db->num_rows($result);
+	if ($resql) $nbtotalofrecords = $db->num_rows($resql);
 	else dol_print_error($db);
 }
 // Add order and limit

+ 2 - 2
htdocs/adherents/type.php

@@ -92,7 +92,7 @@ if ($action == 'add' && $user->rights->adherent->configurer)
 
 		if ($adht->libelle)
 		{
-			$id=$adht->create($user->id);
+			$id=$adht->create($user);
 			if ($id > 0)
 			{
 				header("Location: ".$_SERVER["PHP_SELF"]);
@@ -127,7 +127,7 @@ if ($action == 'update' && $user->rights->adherent->configurer)
 		// Fill array 'array_options' with data from add form
 		$ret = $extrafields->setOptionalsFromPost($extralabels,$adht);
 
-		$adht->update($user->id);
+		$adht->update($user);
 
 		header("Location: ".$_SERVER["PHP_SELF"]."?rowid=".$_POST["rowid"]);
 		exit;

+ 6 - 1
htdocs/compta/bank/class/account.class.php

@@ -36,7 +36,12 @@ class Account extends CommonObject
     public $element='bank_account';
     public $table_element='bank_account';
 
-    var $rowid;	 	// deprecated
+    /**
+     * //TODO: Discuss this. $rowid is preferred over $id
+     * @var
+     * @deprecated
+     */
+    var $rowid;
     var $id;
     var $ref;
     var $label;

+ 1 - 1
htdocs/core/class/extrafields.class.php

@@ -590,7 +590,7 @@ class ExtraFields
 	 * @param	string	$value          Value to show (for date type it must be in timestamp format)
 	 * @param	string	$moreparam      To add more parametes on html input tag
 	 * @param	string	$keyprefix		Prefix string to add into name and id of field (can be used to avoid duplicate names)
-	 * @return	void
+	 * @return	string
 	 */
 	function showInputField($key,$value,$moreparam='',$keyprefix='')
 	{

+ 1 - 1
htdocs/core/class/html.form.class.php

@@ -4452,7 +4452,7 @@ class Form
      *    	Return HTML code to output a photo
      *
      *    	@param	string		$modulepart		Key to define module concerned ('societe', 'userphoto', 'memberphoto')
-     *     	@param  Object		$object			Object containing data to retrieve file name
+     *     	@param  object		$object			Object containing data to retrieve file name
      * 		@param	int			$width			Width of photo
      * 	  	@return string    					HTML code to output photo
      */

+ 1 - 1
htdocs/core/class/html.formcompany.class.php

@@ -709,7 +709,7 @@ class FormCompany
 	 *    @param    string		$fields					Fields
 	 *    @param    int			$fieldsize				Field size
 	 *    @param    int			$disableautocomplete    1 To disable autocomplete features
-	 *    @return	void
+	 *    @return	string
 	 */
 	function select_ziptown($selected='', $htmlname='zipcode', $fields='', $fieldsize=0, $disableautocomplete=0)
 	{

+ 1 - 1
htdocs/core/class/ldap.class.php

@@ -801,7 +801,7 @@ class Ldap
 	 *
 	 *	@param	string	$dn			DN entry key
 	 *	@param	string	$filter		Filter
-	 *	@return	int					<0 if KO, >0 if OK
+	 *	@return	int|false|array					<0 or false if KO, array if OK
 	 */
 	function getAttribute($dn,$filter)
 	{

+ 2 - 2
htdocs/core/lib/company.lib.php

@@ -904,7 +904,7 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='')
  * 		@param	Conf		$conf		Object conf
  * 		@param	Translate	$langs		Object langs
  * 		@param	DoliDB		$db			Object db
- * 		@param	Object		$object		Object third party or member
+ * 		@param	Adherent|Societe		$object		Object third party or member
  * 		@param	Contact		$objcon		Object contact
  *      @param  int			$noprint	Return string but does not output it
  *      @return	mixed					Return html part or void if noprint is 1
@@ -1067,7 +1067,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
  * 		@param	Conf		$conf		Object conf
  * 		@param	Translate	$langs		Object langs
  * 		@param	DoliDB		$db			Object db
- * 		@param	Object		$object		Object third party or member
+ * 		@param	Adherent|Societe		$object		Object third party or member
  * 		@param	Contact		$objcon		Object contact
  *      @param  int			$noprint    Return string but does not output it
  *      @return	mixed					Return html part or void if noprint is 1

+ 4 - 4
htdocs/core/lib/functions.lib.php

@@ -657,7 +657,7 @@ function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto
  *	@param  int		$notab				0=Add tab header, 1=no tab header. If you set this to 1, using dol_fiche_end() to close tab is not required.
  * 	@param	string	$picto				Add a picto on tab title
  *	@param	int		$pictoisfullpath	If 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto.
- * 	@return	void
+ * 	@return	string
  */
 function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0)
 {
@@ -739,7 +739,7 @@ function dol_fiche_end($notab=0)
  *	Return tab footer of a card
  *
  *	@param  int		$notab		0=Add tab footer, 1=no tab footer
- *  @return	void
+ *  @return	string
  */
 function dol_get_fiche_end($notab=0)
 {
@@ -2647,7 +2647,7 @@ function print_fiche_titre($title, $mesg='', $picto='title.png', $pictoisfullpat
  *	@param	string	$picto				Icon to use before title (should be a 32x32 transparent png file)
  *	@param	int		$pictoisfullpath	1=Icon name is a full absolute url of image
  * 	@param	int		$id					To force an id on html objects
- * 	@return	void
+ * 	@return	string
  */
 function load_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpath=0, $id='')
 {
@@ -4639,7 +4639,7 @@ function picto_from_langcode($codelang)
  *
  *  @param	Conf			$conf           Object conf
  *  @param  Translate		$langs          Object langs
- *  @param  Object|null		$object         Object object
+ *  @param  object|null		$object         Object object
  *  @param  array			$head          	Object head
  *  @param  int				$h				New position to fill
  *  @param  string			$type           Value for object where objectvalue can be

+ 3 - 3
htdocs/core/lib/member.lib.php

@@ -24,10 +24,10 @@
 /**
  *  Return array head with list of tabs to view object informations
  *
- *  @param	Object	$object         Member
+ *  @param	Adherent	$object         Member
  *  @return array           		head
  */
-function member_prepare_head($object)
+function member_prepare_head(Adherent $object)
 {
 	global $langs, $conf, $user;
 
@@ -155,7 +155,7 @@ function member_admin_prepare_head()
 /**
  *  Return array head with list of tabs to view object stats informations
  *
- *  @param	Object	$object         Member or null
+ *  @param	Adherent	$object         Member or null
  *  @return	array           		head
  */
 function member_stats_prepare_head($object)

+ 5 - 5
htdocs/mailmanspip/class/mailmanspip.class.php

@@ -166,7 +166,7 @@ class MailmanSpip
     /**
      *  Fonction qui donne les droits redacteurs dans spip
      *
-     *	@param	Object	$object		Object with data (->firstname, ->lastname, ->email and ->login)
+     *	@param	object	$object		Object with data (->firstname, ->lastname, ->email and ->login)
      *  @return	int					=0 if KO, >0 if OK
      */
     function add_to_spip($object)
@@ -208,7 +208,7 @@ class MailmanSpip
     /**
      *  Fonction qui enleve les droits redacteurs dans spip
      *
-     *	@param	Object	$object		Object with data (->login)
+     *	@param	object	$object		Object with data (->login)
      *  @return	int					=0 if KO, >0 if OK
      */
     function del_to_spip($object)
@@ -247,7 +247,7 @@ class MailmanSpip
     /**
      *  Fonction qui dit si cet utilisateur est un redacteur existant dans spip
      *
-     *	@param	Object	$object		Object with data (->login)
+     *	@param	object	$object		Object with data (->login)
      *  @return int     			1=exists, 0=does not exists, -1=error
      */
     function is_in_spip($object)
@@ -297,7 +297,7 @@ class MailmanSpip
     /**
      *  Subscribe an email to all mailing-lists
      *
-     *	@param	Object	$object		Object with data (->email, ->pass, ->element, ->type)
+     *	@param	object	$object		Object with data (->email, ->pass, ->element, ->type)
      *  @param	array	$listes    	To force mailing-list (string separated with ,)
      *  @return	int		  			<0 if KO, >=0 if OK
      */
@@ -369,7 +369,7 @@ class MailmanSpip
      *  Unsubscribe an email from all mailing-lists
      *  Used when a user is resiliated
      *
-     *	@param	Object	$object		Object with data (->email, ->pass, ->element, ->type)
+     *	@param	object	$object		Object with data (->email, ->pass, ->element, ->type)
      *  @param	array	$listes     To force mailing-list (string separated with ,)
      *  @return int         		<0 if KO, >=0 if OK
      */