Misc Adherents PHPDoc corrections

This commit is contained in:
Marcos García de La Fuente 2015-02-10 10:45:48 +01:00
parent 0d150b1d32
commit 157a6e109e
17 changed files with 44 additions and 32 deletions

View File

@ -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>';

View File

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

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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='')
{

View File

@ -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
*/

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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
*/