Skip to content

Commit

Permalink
Fix: Missing condition
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Dec 14, 2013
1 parent 684be44 commit 5a4b5dc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
37 changes: 21 additions & 16 deletions htdocs/adherents/fiche.php
Expand Up @@ -285,7 +285,7 @@
$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"];
Expand Down Expand Up @@ -428,7 +428,7 @@
$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"];
Expand All @@ -453,7 +453,7 @@
$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;
Expand Down Expand Up @@ -861,11 +861,11 @@ function initfieldrequired()
// 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";
Expand Down Expand Up @@ -1103,10 +1103,11 @@ function initfieldrequired()
// 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";
Expand Down Expand Up @@ -1327,15 +1328,15 @@ function initfieldrequired()

/*
* Confirm add in spip
*/
*/
if ($action == 'add_spip')
{
print $form->formconfirm("fiche.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
}

/*
* Confirm removed from spip
*/
*/
if ($action == 'del_spip')
{
print $form->formconfirm("fiche.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
Expand All @@ -1344,6 +1345,7 @@ function initfieldrequired()
$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%">';

Expand Down Expand Up @@ -1426,8 +1428,11 @@ function initfieldrequired()
// 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>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/modules.php
Expand Up @@ -159,7 +159,7 @@
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)
{
Expand Down

0 comments on commit 5a4b5dc

Please sign in to comment.