Skip to content

Commit

Permalink
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
Browse files Browse the repository at this point in the history
develop

Conflicts:
	htdocs/core/tpl/freeproductline_create.tpl.php
	htdocs/core/tpl/predefinedproductline_create.tpl.php
  • Loading branch information
eldy committed Sep 15, 2012
2 parents 4566595 + 89e70cd commit 9147911
Show file tree
Hide file tree
Showing 242 changed files with 1,090 additions and 1,081 deletions.
2 changes: 1 addition & 1 deletion htdocs/adherents/admin/adherent.php
Expand Up @@ -178,7 +178,7 @@
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="constname" value="ADHERENT_BANK_USE">';
print '<tr '.$bc[$var].'><td>'.$langs->trans("AddSubscriptionIntoAccount").'</td>';
if ($conf->banque->enabled)
if (! empty($conf->banque->enabled))
{
print '<td>';
print $form->selectyesno('constvalue',$conf->global->ADHERENT_BANK_USE,1);
Expand Down
4 changes: 2 additions & 2 deletions htdocs/adherents/admin/mailman.php
Expand Up @@ -163,7 +163,7 @@
* Mailman
*/
$var=!$var;
if ($conf->global->ADHERENT_USE_MAILMAN)
if (! empty($conf->global->ADHERENT_USE_MAILMAN))
{
//$lien=img_picto($langs->trans("Active"),'tick').' ';
$lien='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">';
Expand Down Expand Up @@ -214,7 +214,7 @@

dol_fiche_end();

if ($conf->global->ADHERENT_USE_MAILMAN)
if (! empty($conf->global->ADHERENT_USE_MAILMAN))
{
print '<form action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="action" value="testsubscribe">';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/adherents/admin/public.php
Expand Up @@ -167,8 +167,8 @@ function initfields()
print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
print '</td><td width="60" align="right">';
$listofval=array();
if ($conf->paybox->enabled) $listofval['paybox']='Paybox';
if ($conf->paypal->enabled) $listofval['paypal']='PayPal';
if (! empty($conf->paybox->enabled)) $listofval['paybox']='Paybox';
if (! empty($conf->paypal->enabled)) $listofval['paypal']='PayPal';
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),1);
print "</td></tr>\n";
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/admin/spip.php
Expand Up @@ -123,7 +123,7 @@
* Spip
*/
$var=!$var;
if ($conf->global->ADHERENT_USE_SPIP)
if (! empty($conf->global->ADHERENT_USE_SPIP))
{
//$lien=img_picto($langs->trans("Active"),'tick').' ';
$lien='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_SPIP">';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/adherents/agenda.php
Expand Up @@ -79,7 +79,7 @@

llxHeader("",$langs->trans("Agenda"),'');

if ($conf->notification->enabled) $langs->load("mails");
if (! empty($conf->notification->enabled)) $langs->load("mails");
$head = member_prepare_head($object);

dol_fiche_head($head, 'agenda', $langs->trans("Member"),0,'user');
Expand Down Expand Up @@ -142,7 +142,7 @@

print '<div class="tabsAction">';

if ($conf->agenda->enabled)
if (! empty($conf->agenda->enabled))
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&socid='.$socid.'">'.$langs->trans("AddAction").'</a>';
}
Expand Down
24 changes: 12 additions & 12 deletions htdocs/adherents/card_subscriptions.php
Expand Up @@ -246,7 +246,7 @@
}
else
{
if ($conf->banque->enabled && $_POST["paymentsave"] != 'none')
if (! empty($conf->banque->enabled) && $_POST["paymentsave"] != 'none')
{
if ($_POST["cotisation"])
{
Expand Down Expand Up @@ -479,7 +479,7 @@

$rowspan=9;
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan+=1;
if ($conf->societe->enabled) $rowspan++;
if (! empty($conf->societe->enabled)) $rowspan++;

print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
Expand Down Expand Up @@ -545,7 +545,7 @@
print '</td></tr>';

// Third party Dolibarr
if ($conf->societe->enabled)
if (! empty($conf->societe->enabled))
{
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
Expand Down Expand Up @@ -675,7 +675,7 @@
print '<td align="center">'.$langs->trans("DateSubscription").'</td>';
print '<td align="center">'.$langs->trans("DateEnd").'</td>';
print '<td align="right">'.$langs->trans("Amount").'</td>';
if ($conf->banque->enabled)
if (! empty($conf->banque->enabled))
{
print '<td align="right">'.$langs->trans("Account").'</td>';
}
Expand All @@ -693,7 +693,7 @@
print '<td align="center">'.dol_print_date($db->jdate($objp->dateadh),'day')."</td>\n";
print '<td align="center">'.dol_print_date($db->jdate($objp->datef),'day')."</td>\n";
print '<td align="right">'.price($objp->cotisation).'</td>';
if ($conf->banque->enabled)
if (! empty($conf->banque->enabled))
{
print '<td align="right">';
if ($objp->bid)
Expand All @@ -720,7 +720,7 @@


// Link for paypal payment
if ($conf->paypal->enabled)
if (! empty($conf->paypal->enabled))
{
include_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php';
print showPaypalPaymentUrl('membersubscription',$object->ref);
Expand All @@ -740,8 +740,8 @@
$bankdirect=0; // Option to write to bank is on by default
$bankviainvoice=0; // Option to write via invoice is on by default
$invoiceonly=0;
if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE && (empty($_POST['paymentsave']) || $_POST["paymentsave"] == 'bankdirect')) $bankdirect=1;
if ($conf->banque->enabled && $conf->societe->enabled && $conf->facture->enabled && $object->fk_soc) $bankviainvoice=1;
if (! empty($conf->banque->enabled) && $conf->global->ADHERENT_BANK_USE && (empty($_POST['paymentsave']) || $_POST["paymentsave"] == 'bankdirect')) $bankdirect=1;
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled) && $object->fk_soc) $bankviainvoice=1;

print "\n\n<!-- Form add subscription -->\n";

Expand Down Expand Up @@ -873,7 +873,7 @@
print dol_print_date(($datefrom?$datefrom:time()),"%Y").'" ></td></tr>';

// Complementary action
if ($conf->banque->enabled || $conf->facture->enabled)
if (! empty($conf->banque->enabled) || ! empty($conf->facture->enabled))
{
$company=new Societe($db);
if ($object->fk_soc)
Expand All @@ -889,12 +889,12 @@
print '</td>';
print '<td>';
print '<input type="radio" class="moreaction" id="none" name="paymentsave" value="none"'.(!$bankdirect&&!$bankviainvoice?' checked="checked"':'').'> '.$langs->trans("None").'<br>';
if ($conf->banque->enabled)
if (! empty($conf->banque->enabled))
{
print '<input type="radio" class="moreaction" id="bankdirect" name="paymentsave" value="bankdirect"'.($bankdirect?' checked="checked"':'');
print '> '.$langs->trans("MoreActionBankDirect").'<br>';
}
if ($conf->societe->enabled && $conf->facture->enabled)
if (! empty($conf->societe->enabled) && ! empty($conf->facture->enabled))
{
print '<input type="radio" class="moreaction" id="invoiceonly" name="paymentsave" value="invoiceonly"'.($invoiceonly?' checked="checked"':'');
if (empty($object->fk_soc) || empty($bankviainvoice)) print ' disabled="disabled"';
Expand All @@ -909,7 +909,7 @@
}
print '<br>';
}
if ($conf->banque->enabled && $conf->societe->enabled && $conf->facture->enabled)
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled))
{
print '<input type="radio" class="moreaction" id="bankviainvoice" name="paymentsave" value="bankviainvoice"'.($bankviainvoice?' checked="checked"':'');
if (empty($object->fk_soc) || empty($bankviainvoice)) print ' disabled="disabled"';
Expand Down
52 changes: 26 additions & 26 deletions htdocs/adherents/class/adherent.class.php
Expand Up @@ -160,7 +160,7 @@ function send_an_email($text, $subject, $filename_list=array(), $mimetype_list=a

// Envoi mail confirmation
$from=$conf->email_from;
if ($conf->global->ADHERENT_MAIL_FROM) $from=$conf->global->ADHERENT_MAIL_FROM;
if (! empty($conf->global->ADHERENT_MAIL_FROM)) $from=$conf->global->ADHERENT_MAIL_FROM;

include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$mailfile = new CMailFile($subjecttosend, $this->email, $from, $texttosend, $filename_list, $mimetype_list, $mimefilename_list, $addr_cc, $addr_bcc, $deliveryreceipt, $msgishtml);
Expand Down Expand Up @@ -1382,7 +1382,7 @@ function add_to_abo()
}

// spip
if ($conf->global->ADHERENT_USE_SPIP && $conf->mailmanspip->enabled)
if ($conf->global->ADHERENT_USE_SPIP && ! empty($conf->mailmanspip->enabled))
{
$result=$mailmanspip->add_to_spip($this);
if ($result < 0)
Expand Down Expand Up @@ -1427,7 +1427,7 @@ function del_to_abo()
}
}

if ($conf->global->ADHERENT_USE_SPIP && $conf->mailmanspip->enabled)
if ($conf->global->ADHERENT_USE_SPIP && ! empty($conf->mailmanspip->enabled))
{
$result=$mailmanspip->del_to_spip($this);
if ($result < 0)
Expand Down Expand Up @@ -1787,31 +1787,31 @@ function _load_ldap_info()
$this->fullname=$this->getFullName($langs);

// Member
if ($this->fullname && $conf->global->LDAP_MEMBER_FIELD_FULLNAME) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname;
if ($this->nom && $conf->global->LDAP_MEMBER_FIELD_NAME) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->nom;
if ($this->prenom && $conf->global->LDAP_MEMBER_FIELD_FIRSTNAME) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->prenom;
if ($this->login && $conf->global->LDAP_MEMBER_FIELD_LOGIN) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login;
if ($this->pass && $conf->global->LDAP_MEMBER_FIELD_PASSWORD) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
if ($this->poste && $conf->global->LDAP_MEMBER_FIELD_TITLE) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste;
if ($this->adresse && $conf->global->LDAP_MEMBER_FIELD_ADDRESS) $info[$conf->global->LDAP_MEMBER_FIELD_ADDRESS] = $this->adresse;
if ($this->cp && $conf->global->LDAP_MEMBER_FIELD_ZIP) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->cp;
if ($this->ville && $conf->global->LDAP_MEMBER_FIELD_TOWN) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->ville;
if ($this->country_code && $conf->global->LDAP_MEMBER_FIELD_COUNTRY) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code;
if ($this->email && $conf->global->LDAP_MEMBER_FIELD_MAIL) $info[$conf->global->LDAP_MEMBER_FIELD_MAIL] = $this->email;
if ($this->phone && $conf->global->LDAP_MEMBER_FIELD_PHONE) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE] = $this->phone;
if ($this->phone_perso && $conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO] = $this->phone_perso;
if ($this->phone_mobile && $conf->global->LDAP_MEMBER_FIELD_MOBILE) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile;
if ($this->fax && $conf->global->LDAP_MEMBER_FIELD_FAX) $info[$conf->global->LDAP_MEMBER_FIELD_FAX] = $this->fax;
if ($this->note && $conf->global->LDAP_MEMBER_FIELD_DESCRIPTION) $info[$conf->global->LDAP_MEMBER_FIELD_DESCRIPTION] = $this->note;
if ($this->naiss && $conf->global->LDAP_MEMBER_FIELD_BIRTHDATE) $info[$conf->global->LDAP_MEMBER_FIELD_BIRTHDATE] = dol_print_date($this->naiss,'dayhourldap');
if (isset($this->statut) && $conf->global->LDAP_FIELD_MEMBER_STATUS) $info[$conf->global->LDAP_FIELD_MEMBER_STATUS] = $this->statut;
if ($this->datefin && $conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION) $info[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION] = dol_print_date($this->datefin,'dayhourldap');
if ($this->fullname && ! empty($conf->global->LDAP_MEMBER_FIELD_FULLNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname;
if ($this->nom && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->nom;
if ($this->prenom && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->prenom;
if ($this->login && ! empty($conf->global->LDAP_MEMBER_FIELD_LOGIN)) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login;
if ($this->pass && ! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
if ($this->poste && ! empty($conf->global->LDAP_MEMBER_FIELD_TITLE)) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste;
if ($this->adresse && ! empty($conf->global->LDAP_MEMBER_FIELD_ADDRESS)) $info[$conf->global->LDAP_MEMBER_FIELD_ADDRESS] = $this->adresse;
if ($this->cp && ! empty($conf->global->LDAP_MEMBER_FIELD_ZIP)) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->cp;
if ($this->ville && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->ville;
if ($this->country_code && ! empty($conf->global->LDAP_MEMBER_FIELD_COUNTRY)) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code;
if ($this->email && ! empty($conf->global->LDAP_MEMBER_FIELD_MAIL)) $info[$conf->global->LDAP_MEMBER_FIELD_MAIL] = $this->email;
if ($this->phone && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE] = $this->phone;
if ($this->phone_perso && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO] = $this->phone_perso;
if ($this->phone_mobile && ! empty($conf->global->LDAP_MEMBER_FIELD_MOBILE)) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile;
if ($this->fax && ! empty($conf->global->LDAP_MEMBER_FIELD_FAX)) $info[$conf->global->LDAP_MEMBER_FIELD_FAX] = $this->fax;
if ($this->note && ! empty($conf->global->LDAP_MEMBER_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_MEMBER_FIELD_DESCRIPTION] = $this->note;
if ($this->naiss && ! empty($conf->global->LDAP_MEMBER_FIELD_BIRTHDATE)) $info[$conf->global->LDAP_MEMBER_FIELD_BIRTHDATE] = dol_print_date($this->naiss,'dayhourldap');
if (isset($this->statut) && ! empty($conf->global->LDAP_FIELD_MEMBER_STATUS)) $info[$conf->global->LDAP_FIELD_MEMBER_STATUS] = $this->statut;
if ($this->datefin && ! empty($conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION)) $info[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION] = dol_print_date($this->datefin,'dayhourldap');

// Subscriptions
if ($this->first_subscription_date && $conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE] = dol_print_date($this->first_subscription_date,'dayhourldap');
if (isset($this->first_subscription_amount) && $conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT] = $this->first_subscription_amount;
if ($this->last_subscription_date && $conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE) $info[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE] = dol_print_date($this->last_subscription_date,'dayhourldap');
if (isset($this->last_subscription_amount) && $conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT) $info[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT] = $this->last_subscription_amount;
if ($this->first_subscription_date && ! empty($conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE)) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE] = dol_print_date($this->first_subscription_date,'dayhourldap');
if (isset($this->first_subscription_amount) && ! empty($conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT)) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT] = $this->first_subscription_amount;
if ($this->last_subscription_date && ! empty($conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE)) $info[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE] = dol_print_date($this->last_subscription_date,'dayhourldap');
if (isset($this->last_subscription_amount) && ! empty($conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT)) $info[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT] = $this->last_subscription_amount;

return $info;
}
Expand Down
10 changes: 5 additions & 5 deletions htdocs/adherents/cotisations.php
Expand Up @@ -99,7 +99,7 @@
print_liste_field_titre($langs->trans("Name"),"cotisations.php","d.nom",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Login"),"cotisations.php","d.login",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Label"),"cotisations.php","c.note",$param,"",'align="left"',$sortfield,$sortorder);
if ($conf->banque->enabled)
if (! empty($conf->banque->enabled))
{
print_liste_field_titre($langs->trans("Account"),"cotisations.php","b.fk_account",$pram,"","",$sortfield,$sortorder);
}
Expand Down Expand Up @@ -131,7 +131,7 @@

$var=!$var;

if ($allowinsertbankafter && ! $objp->fk_account && $conf->banque->enabled && $objp->cotisation)
if ($allowinsertbankafter && ! $objp->fk_account && ! empty($conf->banque->enabled) && $objp->cotisation)
{
print "<form method=\"post\" action=\"cotisations.php\">";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
Expand All @@ -153,7 +153,7 @@
print '</td>';

// Banque
if ($conf->banque->enabled)
if (! empty($conf->banque->enabled))
{
if ($objp->fk_account)
{
Expand Down Expand Up @@ -193,7 +193,7 @@
print '<td align="right">'.price($objp->cotisation).'</td>';

print "</tr>";
if ($allowinsertbankafter && ! $objp->fk_account && $conf->banque->enabled && $objp->cotisation)
if ($allowinsertbankafter && ! $objp->fk_account && ! empty($conf->banque->enabled) && $objp->cotisation)
{
print "</form>\n";
}
Expand All @@ -207,7 +207,7 @@
print "<td align=\"right\">&nbsp;</td>\n";
print "<td align=\"right\">&nbsp;</td>\n";
print "<td align=\"right\">&nbsp;</td>\n";
if ($conf->banque->enabled)
if (! empty($conf->banque->enabled))
{
print '<td>&nbsp;</td>';
}
Expand Down

0 comments on commit 9147911

Please sign in to comment.