Fix: Missing condition

This commit is contained in:
Laurent Destailleur 2013-12-14 14:21:27 +01:00
parent 684be44846
commit 5a4b5dcc26
2 changed files with 22 additions and 17 deletions

View File

@ -285,7 +285,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
$object->phone_perso = trim($_POST["phone_perso"]);
$object->phone_mobile= trim($_POST["phone_mobile"]);
$object->email = trim($_POST["email"]);
$object->skype = trim($_POST["skype"]);
$object->skype = trim($_POST["skype"]);
$object->birth = $birthdate;
$object->typeid = $_POST["typeid"];
@ -428,7 +428,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
$phone=$_POST["phone"];
$phone_perso=$_POST["phone_perso"];
$phone_mobile=$_POST["phone_mobile"];
$skype=$_POST["member_skype"];
$skype=$_POST["member_skype"];
$email=$_POST["member_email"];
$login=$_POST["member_login"];
$pass=$_POST["password"];
@ -453,7 +453,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
$object->phone = $phone;
$object->phone_perso = $phone_perso;
$object->phone_mobile= $phone_mobile;
$object->skype = $skype;
$object->skype = $skype;
$object->email = $email;
$object->login = $login;
$object->pass = $pass;
@ -861,11 +861,11 @@ else
// Tel mobile
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile','alpha')?GETPOST('phone_mobile','alpha'):$object->phone_mobile).'"></td></tr>';
// Skype
if (! empty($conf->skype->enabled))
{
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="member_skype" size="40" value="'.(GETPOST('member_skype','alpha')?GETPOST('member_skype','alpha'):$object->skype).'"></td></tr>';
}
// Skype
if (! empty($conf->skype->enabled))
{
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="member_skype" size="40" value="'.(GETPOST('member_skype','alpha')?GETPOST('member_skype','alpha'):$object->skype).'"></td></tr>';
}
// Birthday
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
@ -1103,10 +1103,11 @@ else
// Tel mobile
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td></tr>';
// Skype
if (! empty($conf->skype->enabled)) {
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
}
// Skype
if (! empty($conf->skype->enabled))
{
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
}
// Birthday
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
@ -1327,7 +1328,7 @@ else
/*
* Confirm add in spip
*/
*/
if ($action == 'add_spip')
{
print $form->formconfirm("fiche.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
@ -1335,7 +1336,7 @@ else
/*
* Confirm removed from spip
*/
*/
if ($action == 'del_spip')
{
print $form->formconfirm("fiche.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
@ -1344,6 +1345,7 @@ else
$rowspan=17;
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan++;
if (! empty($conf->societe->enabled)) $rowspan++;
if (! empty($conf->skype->enabled)) $rowspan++;
print '<table class="border" width="100%">';
@ -1426,8 +1428,11 @@ else
// Tel mobile
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td class="valeur">'.dol_print_phone($object->phone_mobile,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
// Skype
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
// Skype
if (! empty($conf->skype->enabled))
{
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
}
// Birthday
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';

View File

@ -159,7 +159,7 @@ foreach ($modulesdir as $dir)
if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) $modulequalified=0;
// We discard modules according to property disabled
if (isset($objMod->hidden) && $objMod->hidden) $modulequalified=false;
// Define array $categ with categ with at least one qualified module
if ($modulequalified)
{