diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php
index 6b2d432fe46..ca5011849b1 100644
--- a/htdocs/adherents/admin/adherent.php
+++ b/htdocs/adherents/admin/adherent.php
@@ -71,9 +71,7 @@ if ($action == 'updateall')
{
setEventMessages('ErrorFailedToSaveDate', null, 'errors');
$db->rollback();
- }
- else
- {
+ } else {
setEventMessages('RecordModifiedSuccessfully', null, 'mesgs');
$db->commit();
}
@@ -101,9 +99,7 @@ if ($action == 'update' || $action == 'add')
if (!$error)
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
- }
- else
- {
+ } else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -199,9 +195,7 @@ if ($conf->facture->enabled)
print '
';
$enabledisablehtml .= img_picto($langs->trans("Activated"), 'switch_on');
diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php
index 20d712e6179..f1d83a4b314 100644
--- a/htdocs/adherents/agenda.php
+++ b/htdocs/adherents/agenda.php
@@ -53,9 +53,7 @@ if (GETPOST('actioncode', 'array'))
{
$actioncode = GETPOST('actioncode', 'array', 3);
if (!count($actioncode)) $actioncode = '0';
-}
-else
-{
+} else {
$actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
}
$search_agenda_label = GETPOST('search_agenda_label');
diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php
index eeee48e2138..44046d5a26e 100644
--- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php
+++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php
@@ -118,9 +118,7 @@ abstract class ActionsAdherentCardCommon
{
$this->tpl['company'] = $objsoc->getNomUrl(1);
$this->tpl['company_id'] = $objsoc->id;
- }
- else
- {
+ } else {
$this->tpl['company'] = $form->select_company($this->object->socid, 'socid', '', 1);
}
@@ -190,9 +188,7 @@ abstract class ActionsAdherentCardCommon
$objsoc->fetch($this->object->socid);
$this->tpl['company'] = $objsoc->getNomUrl(1);
- }
- else
- {
+ } else {
$this->tpl['company'] = $langs->trans("AdherentNotLinkedToThirdParty");
}
@@ -273,9 +269,7 @@ abstract class ActionsAdherentCardCommon
$this->object->country_code = $obj->code;
$this->object->country = $langs->trans("Country".$obj->code) ? $langs->trans("Country".$obj->code) : $obj->libelle;
- }
- else
- {
+ } else {
dol_print_error($this->db);
}
}
diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php
index 60bb2ecd034..f248256a547 100644
--- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php
+++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php
@@ -105,9 +105,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
$this->tpl['actionstodo'] = show_actions_todo($conf, $langs, $db, $objsoc, $this->object, 1);
$this->tpl['actionsdone'] = show_actions_done($conf, $langs, $db, $objsoc, $this->object, 1);
- }
- else
- {
+ } else {
// Confirm delete contact
if ($action == 'delete' && $user->rights->adherent->supprimer)
{
diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php
index c913d6a1b49..7a5880fc317 100644
--- a/htdocs/adherents/card.php
+++ b/htdocs/adherents/card.php
@@ -209,9 +209,7 @@ if (empty($reshook))
$langs->load("errors");
setEventMessages($langs->trans($nuser->error), null, 'errors');
}
- }
- else
- {
+ } else {
setEventMessages($object->error, $object->errors, 'errors');
}
}
@@ -231,9 +229,7 @@ if (empty($reshook))
setEventMessages($langs->trans($company->error), null, 'errors');
setEventMessages($company->error, $company->errors, 'errors');
}
- }
- else
- {
+ } else {
setEventMessages($object->error, $object->errors, 'errors');
}
}
@@ -376,21 +372,15 @@ if (empty($reshook))
if (!dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1, 0, $_FILES['photo']['error']) > 0)
{
setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors');
- }
- else
- {
+ } else {
// Create thumbs
$object->addThumbs($newfile);
}
}
- }
- else
- {
+ } else {
setEventMessages("ErrorBadImageFormat", null, 'errors');
}
- }
- else
- {
+ } else {
switch ($_FILES['photo']['error'])
{
case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini
@@ -412,15 +402,11 @@ if (empty($reshook))
header("Location: ".$backtopage);
exit;
}
- }
- else
- {
+ } else {
setEventMessages($object->error, $object->errors, 'errors');
$action = '';
}
- }
- else
- {
+ } else {
$action = 'edit';
}
}
@@ -527,8 +513,7 @@ if (empty($reshook))
if (empty($login)) {
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login")), null, 'errors');
- }
- else {
+ } else {
$sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='".$db->escape($login)."'";
$result = $db->query($sql);
if ($result) {
@@ -588,9 +573,7 @@ if (empty($reshook))
$rowid = $object->id;
$id = $object->id;
$action = '';
- }
- else
- {
+ } else {
$db->rollback();
if ($object->error) {
@@ -616,15 +599,11 @@ if (empty($reshook))
{
header("Location: ".$backtopage);
exit;
- }
- else
- {
+ } else {
header("Location: list.php");
exit;
}
- }
- else
- {
+ } else {
$errmesg = $object->error;
}
}
@@ -689,9 +668,7 @@ if (empty($reshook))
}
}
}
- }
- else
- {
+ } else {
$error++;
if ($object->error) {
setEventMessages($object->error, $object->errors, 'errors');
@@ -703,9 +680,7 @@ if (empty($reshook))
if (!$error)
{
$db->commit();
- }
- else
- {
+ } else {
$db->rollback();
}
$action = '';
@@ -770,9 +745,7 @@ if (empty($reshook))
}
}
}
- }
- else
- {
+ } else {
$error++;
if ($object->error) {
@@ -857,9 +830,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
}
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
$objcanvas->display_canvas($action); // Show template
-}
-else
-{
+} else {
// -----------------------------------------
// When used in standard mode
// -----------------------------------------
@@ -1027,9 +998,7 @@ else
if ($object->country_id)
{
print $formcompany->select_state(GETPOST('state_id', 'int') ?GETPOST('state_id', 'int') : $object->state_id, $object->country_code);
- }
- else
- {
+ } else {
print $countrynotdefined;
}
print '';
@@ -1084,9 +1053,7 @@ else
if (!empty($backtopage))
{
print ' ';
- }
- else
- {
+ } else {
print ' ';
}
print '';
@@ -1123,9 +1090,7 @@ else
if ($resql)
{
$obj = $db->fetch_object($resql);
- }
- else
- {
+ } else {
dol_print_error($db);
}
$object->country_id = $obj->rowid;
@@ -1204,9 +1169,7 @@ else
if ($user->rights->adherent->creer)
{
print $form->selectarray("typeid", $adht->liste_array(), (GETPOSTISSET("typeid") ?GETPOST("typeid", 'int') : $object->typeid));
- }
- else
- {
+ } else {
print $adht->getNomUrl(1);
print ' ';
}
@@ -1334,9 +1297,7 @@ else
$company = new Societe($db);
$result = $company->fetch($object->socid);
print $company->getNomUrl(1);
- }
- else
- {
+ } else {
print $langs->trans("NoThirdPartyAssociatedToMember");
}
print '';
@@ -1432,9 +1393,7 @@ else
{
$companyname = $object->company;
if (!empty($fullname)) $companyalias = $fullname;
- }
- else
- {
+ } else {
$companyname = $fullname;
if (!empty($object->company)) $companyalias = $object->company;
}
@@ -1629,8 +1588,7 @@ else
{
print ''.$langs->trans("Password").' '.preg_replace('/./i', '*', $object->pass);
if ($object->pass) print preg_replace('/./i', '*', $object->pass);
- else
- {
+ else {
if ($user->admin) print $langs->trans("Crypted").': '.$object->pass_indatabase_crypted;
else print $langs->trans("Hidden");
}
@@ -1651,9 +1609,7 @@ else
if ($object->hasDelay()) {
print " ".img_warning($langs->trans("Late"));
}
- }
- else
- {
+ } else {
if ($object->need_subscription == 0)
{
print $langs->trans("SubscriptionNotNeeded");
@@ -1662,9 +1618,7 @@ else
{
print $langs->trans("SubscriptionNotRecorded");
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated
- }
- else
- {
+ } else {
print $langs->trans("SubscriptionNotReceived");
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated
}
@@ -1691,17 +1645,12 @@ else
print ' ';
print ' ';
print ' ';
- }
- else
- {
- if ($object->socid)
- {
+ } else {
+ if ($object->socid) {
$company = new Societe($db);
$result = $company->fetch($object->socid);
print $company->getNomUrl(1);
- }
- else
- {
+ } else {
print $langs->trans("NoThirdPartyAssociatedToMember");
}
}
@@ -1716,14 +1665,13 @@ else
if ($action == 'editlogin')
{
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id, $object->user_id, 'userid', '');
- }
- else
- {
+ } else {
if ($object->user_id)
{
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id, $object->user_id, 'none');
+ } else {
+ print $langs->trans("NoDolibarrAccess");
}
- else print $langs->trans("NoDolibarrAccess");
}
print '';
@@ -1803,9 +1751,7 @@ else
if ($user->rights->adherent->creer)
{
print '";
- }
- else
- {
+ } else {
print ''.$langs->trans("Modify").'
';
}
@@ -1815,9 +1761,7 @@ else
if ($user->rights->adherent->creer)
{
print '\n";
- }
- else
- {
+ } else {
print ''.$langs->trans("Validate").'
';
}
}
@@ -1828,9 +1772,7 @@ else
if ($user->rights->adherent->creer)
{
print '\n";
- }
- else
- {
+ } else {
print ''.$langs->trans("Reenable")."
";
}
}
@@ -1841,9 +1783,7 @@ else
if ($user->rights->adherent->supprimer)
{
print '\n";
- }
- else
- {
+ } else {
print ''.$langs->trans("Resiliate")."
";
}
}
@@ -1855,9 +1795,7 @@ else
{
if ($object->statut != -1) print '';
else print '';
- }
- else
- {
+ } else {
print ''.$langs->trans("CreateDolibarrThirdParty")."
";
}
}
@@ -1869,9 +1807,7 @@ else
{
if ($object->statut != -1) print '';
else print '';
- }
- else
- {
+ } else {
print ''.$langs->trans("CreateDolibarrLogin")."
";
}
}
@@ -1880,9 +1816,7 @@ else
if ($user->rights->adherent->supprimer)
{
print '\n";
- }
- else
- {
+ } else {
print ''.$langs->trans("Delete")."
";
}
diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php
index 86bf523ac51..345542f8cba 100644
--- a/htdocs/adherents/cartes/carte.php
+++ b/htdocs/adherents/cartes/carte.php
@@ -162,11 +162,9 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg)
'photo'=>$objp->photo
);
}
- }
- else
- {
+ } else {
$arrayofmembers[] = array(
- 'textleft'=>$textleft,
+ 'textleft'=>$textleft,
'textheader'=>$textheader,
'textfooter'=>$textfooter,
'textright'=>$textright,
@@ -226,9 +224,7 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg)
{
dol_print_error('', $result);
}
- }
- else
- {
+ } else {
dol_print_error($db);
}
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 55504a547c2..a7410d87973 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -1282,10 +1282,11 @@ class Adherent extends CommonObject
$this->country_id = $obj->country_id;
$this->country_code = $obj->country_code;
- if ($langs->trans("Country".$obj->country_code) != "Country".$obj->country_code)
+ if ($langs->trans("Country".$obj->country_code) != "Country".$obj->country_code) {
$this->country = $langs->transnoentitiesnoconv("Country".$obj->country_code);
- else
+ } else {
$this->country = $obj->country;
+ }
$this->phone = $obj->phone;
$this->phone_perso = $obj->phone_perso;
@@ -2037,12 +2038,13 @@ class Adherent extends CommonObject
if ($withpictoimg > -2 && $withpictoimg != 2) {
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result .= '';
- if ($mode == 'login')
+ if ($mode == 'login') {
$result .= dol_trunc($this->login, $maxlen);
- elseif ($mode == 'ref')
+ } elseif ($mode == 'ref') {
$result .= $this->id;
- else
+ } else {
$result .= $this->getFullName($langs, '', ($mode == 'firstname' ? 2 : -1), $maxlen);
+ }
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result .= ' ';
}
if ($withpictoimg) $result .= '';
@@ -2803,10 +2805,11 @@ class Adherent extends CommonObject
$listofids .= ', ...';
break;
}
- if (empty($listofids))
+ if (empty($listofids)) {
$listofids .= ' [';
- else
+ } else {
$listofids .= ', ';
+ }
$listofids .= $idmember;
$i++;
}
@@ -2823,10 +2826,11 @@ class Adherent extends CommonObject
$listofids .= ', ...';
break;
}
- if (empty($listofids))
+ if (empty($listofids)) {
$listofids .= ' [';
- else
+ } else {
$listofids .= ', ';
+ }
$listofids .= $idmember;
$i++;
}
diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php
index 4af80ab4a63..199bd5e8a51 100644
--- a/htdocs/adherents/class/adherent_type.class.php
+++ b/htdocs/adherents/class/adherent_type.class.php
@@ -146,9 +146,7 @@ class AdherentType extends CommonObject
$this->multilangs["$obj->lang"]["email"] = $obj->email;
}
return 1;
- }
- else
- {
+ } else {
$this->error = "Error: ".$this->db->lasterror()." - ".$sql;
return -1;
}
@@ -184,9 +182,7 @@ class AdherentType extends CommonObject
$sql2 .= " label='".$this->db->escape($this->label)."',";
$sql2 .= " description='".$this->db->escape($this->description)."'";
$sql2 .= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($key)."'";
- }
- else
- {
+ } else {
$sql2 = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type_lang (fk_type, lang, label, description";
$sql2 .= ")";
$sql2 .= " VALUES(".$this->id.",'".$this->db->escape($key)."','".$this->db->escape($this->label)."',";
@@ -214,9 +210,7 @@ class AdherentType extends CommonObject
$sql2 .= " label='".$this->db->escape($this->multilangs["$key"]["label"])."',";
$sql2 .= " description='".$this->db->escape($this->multilangs["$key"]["description"])."'";
$sql2 .= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($key)."'";
- }
- else
- {
+ } else {
$sql2 = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type_lang (fk_type, lang, label, description";
$sql2 .= ")";
$sql2 .= " VALUES(".$this->id.",'".$this->db->escape($key)."','".$this->db->escape($this->multilangs["$key"]["label"])."',";
@@ -231,9 +225,7 @@ class AdherentType extends CommonObject
return -1;
}
}
- }
- else
- {
+ } else {
// language is not current language and we didn't provide a multilang description for this language
}
}
@@ -274,9 +266,7 @@ class AdherentType extends CommonObject
}
// End call triggers
return 1;
- }
- else
- {
+ } else {
$this->error = $this->db->lasterror();
dol_syslog(get_class($this).'::delMultiLangs error='.$this->error, LOG_ERR);
return -1;
@@ -336,16 +326,12 @@ class AdherentType extends CommonObject
{
$this->db->commit();
return $this->id;
- }
- else
- {
+ } else {
dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR);
$this->db->rollback();
return -2;
}
- }
- else
- {
+ } else {
$this->error = $this->db->lasterror();
$this->db->rollback();
return -1;
@@ -418,16 +404,12 @@ class AdherentType extends CommonObject
{
$this->db->commit();
return 1;
- }
- else
- {
+ } else {
$this->db->rollback();
dol_syslog(get_class($this)."::update ".$this->error, LOG_ERR);
return -$error;
}
- }
- else
- {
+ } else {
$this->error = $this->db->lasterror();
$this->db->rollback();
return -1;
@@ -458,9 +440,7 @@ class AdherentType extends CommonObject
$this->db->commit();
return 1;
- }
- else
- {
+ } else {
$this->db->rollback();
$this->error = $this->db->lasterror();
return -1;
@@ -511,9 +491,7 @@ class AdherentType extends CommonObject
}
return 1;
- }
- else
- {
+ } else {
$this->error = $this->db->lasterror();
return -1;
}
@@ -552,9 +530,7 @@ class AdherentType extends CommonObject
$i++;
}
}
- }
- else
- {
+ } else {
print $this->db->error();
}
return $adherenttypes;
@@ -608,9 +584,7 @@ class AdherentType extends CommonObject
$this->members = $ret;
return $ret;
- }
- else
- {
+ } else {
$this->error = $this->db->lasterror();
return -1;
}
diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php
index 8e2e0d278f0..a5d72f3b78f 100644
--- a/htdocs/adherents/class/api_members.class.php
+++ b/htdocs/adherents/class/api_members.class.php
@@ -239,10 +239,8 @@ class Members extends DolibarrApi
if ($member->update(DolibarrApiAccess::$user) >= 0)
{
return $this->get($id);
- }
- else
- {
- throw new RestException(500, $member->error);
+ } else {
+ throw new RestException(500, $member->error);
}
}
diff --git a/htdocs/adherents/class/api_memberstypes.class.php b/htdocs/adherents/class/api_memberstypes.class.php
index 98cb25b7fc3..c9d12206962 100644
--- a/htdocs/adherents/class/api_memberstypes.class.php
+++ b/htdocs/adherents/class/api_memberstypes.class.php
@@ -207,10 +207,8 @@ class MembersTypes extends DolibarrApi
if ($membertype->update(DolibarrApiAccess::$user) >= 0)
{
return $this->get($id);
- }
- else
- {
- throw new RestException(500, $membertype->error);
+ } else {
+ throw new RestException(500, $membertype->error);
}
}
diff --git a/htdocs/adherents/class/api_subscriptions.class.php b/htdocs/adherents/class/api_subscriptions.class.php
index c9804e5d802..11ac1f17113 100644
--- a/htdocs/adherents/class/api_subscriptions.class.php
+++ b/htdocs/adherents/class/api_subscriptions.class.php
@@ -196,10 +196,8 @@ class Subscriptions extends DolibarrApi
if ($subscription->update(DolibarrApiAccess::$user) > 0)
{
return $this->get($id);
- }
- else
- {
- throw new RestException(500, $subscription->error);
+ } else {
+ throw new RestException(500, $subscription->error);
}
}
diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php
index e512e1152bb..e1ec3bd1753 100644
--- a/htdocs/adherents/class/subscription.class.php
+++ b/htdocs/adherents/class/subscription.class.php
@@ -232,14 +232,10 @@ class Subscription extends CommonObject
$this->note = $obj->note;
$this->fk_bank = $obj->fk_bank;
return 1;
- }
- else
- {
+ } else {
return 0;
}
- }
- else
- {
+ } else {
$this->error = $this->db->lasterror();
return -1;
}
@@ -286,9 +282,7 @@ class Subscription extends CommonObject
if ($result < 0) { $error++; } //Do also here what you must do to rollback action if trigger fail
// End call triggers
}
- }
- else
- {
+ } else {
$error++;
$this->error = $this->db->lasterror();
}
@@ -355,28 +349,20 @@ class Subscription extends CommonObject
{
$this->db->commit();
return 1;
- }
- else
- {
+ } else {
$this->error = $accountline->error;
$this->db->rollback();
return -1;
}
- }
- else
- {
+ } else {
$this->db->commit();
return 1;
}
- }
- else
- {
+ } else {
$this->db->commit();
return 0;
}
- }
- else
- {
+ } else {
$error++;
$this->error = $this->db->lasterror();
}
@@ -488,9 +474,7 @@ class Subscription extends CommonObject
}
$this->db->free($result);
- }
- else
- {
+ } else {
dol_print_error($this->db);
}
}
diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php
index 05ccf20169c..291b1916e55 100644
--- a/htdocs/adherents/document.php
+++ b/htdocs/adherents/document.php
@@ -158,14 +158,10 @@ if ($id > 0)
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
print " ";
- }
- else
- {
+ } else {
dol_print_error($db);
}
-}
-else
-{
+} else {
$langs->load("errors");
print $langs->trans("ErrorRecordNotFound");
}
diff --git a/htdocs/adherents/htpasswd.php b/htdocs/adherents/htpasswd.php
index b7aa8da5d14..385e34d6538 100644
--- a/htdocs/adherents/htpasswd.php
+++ b/htdocs/adherents/htpasswd.php
@@ -79,9 +79,7 @@ if ($resql)
$i++;
}
print " \n";
-}
-else
-{
+} else {
dol_print_error($db);
}
diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php
index 6d069386592..001730d67b1 100644
--- a/htdocs/adherents/index.php
+++ b/htdocs/adherents/index.php
@@ -331,9 +331,7 @@ if ($resql)
$staticmember->fk_soc = $obj->fk_soc;
$staticmember->fetch_thirdparty();
$staticmember->name = $staticmember->thirdparty->name;
- }
- else
- {
+ } else {
$staticmember->name = $obj->company;
}
$staticmember->ref = $staticmember->getFullName($langs);
@@ -349,9 +347,7 @@ if ($resql)
}
print "";
print " ";
-}
-else
-{
+} else {
dol_print_error($db);
}
@@ -411,9 +407,7 @@ if ($resql)
}
print "";
print " ";
-}
-else
-{
+} else {
dol_print_error($db);
}
diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php
index 6a49f99fbf4..43d6a34fcf9 100644
--- a/htdocs/adherents/ldap.php
+++ b/htdocs/adherents/ldap.php
@@ -176,9 +176,7 @@ if ($result > 0)
{
$langs->load("errors");
print ''.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Member")).' ';
- }
- else
- {
+ } else {
$records = $ldap->getAttribute($dn, $search);
//print_r($records);
@@ -189,23 +187,17 @@ if ($result > 0)
if (!is_array($records))
{
print ''.$langs->trans("ErrorFailedToReadLDAP").' ';
- }
- else
- {
+ } else {
$result = show_ldap_content($records, 0, $records['count'], true);
}
- }
- else
- {
+ } else {
print ''.$langs->trans("LDAPRecordNotFound").' (dn='.$dn.' - search='.$search.') ';
}
}
$ldap->unbind();
$ldap->close();
-}
-else
-{
+} else {
setEventMessages($ldap->error, $ldap->errors, 'errors');
}
diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php
index 6cb34192845..72745b54614 100644
--- a/htdocs/adherents/list.php
+++ b/htdocs/adherents/list.php
@@ -214,9 +214,7 @@ if (empty($reshook))
if ($result < 0 && !count($tmpmember->errors))
{
setEventMessages($tmpmember->error, $tmpmember->errors, 'errors');
- }
- else
- {
+ } else {
if ($result > 0) $nbclose++;
}
}
@@ -226,9 +224,7 @@ if (empty($reshook))
setEventMessages($langs->trans("XMembersClosed", $nbclose), null, 'mesgs');
$db->commit();
- }
- else
- {
+ } else {
$db->rollback();
}
}
@@ -858,17 +854,13 @@ while ($i < min($num, $limit))
print " ".img_warning($langs->trans("SubscriptionLate").$textlate);
}
print '';
- }
- else
- {
+ } else {
print '