diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 6c477d46239..215635757c2 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -268,7 +268,7 @@ if ($rowid && $action != 'edit') { // Confirmation to delete subscription if ($action == 'delete') { - //$formquestion=array(); + $formquestion=array(); //$formquestion['text']=''.$langs->trans("ThisWillAlsoDeleteBankRecord").''; $text = $langs->trans("ConfirmDeleteSubscription"); if (isModEnabled("banque") && !empty($conf->global->ADHERENT_BANK_USE)) { @@ -351,7 +351,7 @@ if ($rowid && $action != 'edit') { print '
'; if ($user->rights->adherent->cotisation->creer) { - if (!$bankline->rappro) { + if (!empty($bankline->rappro)) { print '
'.$langs->trans("Modify")."
"; } else { print '
".$langs->trans("Modify")."
"; diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index b7074c51095..b0ea7571a2d 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -357,7 +357,7 @@ print ''.$langs->trans("AntivirusEnabledOnUpload").': '; print empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ? img_warning().' ' : img_picto('', 'tick').' '; print yn(empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ? 0 : 1); if (empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) { - print ' - '.$langs->trans("Recommended").': '.$langs->trans("DefinedAPathForAntivirusCommandIntoSetup", $langs->transnoentitiesnoconv("Home")." - ".$langs->transcountrynoentities("Setup")." - ".$langs->transnoentitiesnoconv("Security")).''; + print ' - '.$langs->trans("Recommended").': '.$langs->trans("DefinedAPathForAntivirusCommandIntoSetup", $langs->transnoentitiesnoconv("Home")." - ".$langs->transnoentitiesnoconv("Setup")." - ".$langs->transnoentitiesnoconv("Security")).''; } else { print '   - '.$conf->global->MAIN_ANTIVIRUS_COMMAND; if (defined('MAIN_ANTIVIRUS_COMMAND') && !defined('MAIN_ANTIVIRUS_BYPASS_COMMAND_AND_PARAM')) { diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 1d2201bb979..53c7c0f6305 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1780,7 +1780,7 @@ class Facture extends CommonInvoice $url = DOL_URL_ROOT.'/compta/facture/card.php?facid='.$this->id; } - if (!$user->rights->facture->lire) { + if (!$user->hasRight("facture", "read")) { $option = 'nolink'; } @@ -1811,7 +1811,7 @@ class Facture extends CommonInvoice } $label = ''; - if ($user->rights->facture->lire) { + if ($user->hasRight("facture", "read")) { $label = img_picto('', $picto).' '.$langs->trans("Invoice").''; if (isset($this->statut) && isset($this->alreadypaid)) { $label .= ' '.$this->getLibStatut(5, $this->alreadypaid); @@ -1847,7 +1847,7 @@ class Facture extends CommonInvoice } $linkclose = ($target ? ' target="'.$target.'"' : ''); - if (empty($notooltip) && $user->rights->facture->lire) { + if (empty($notooltip) && $user->hasRight("facture", "read")) { if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("Invoice"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 6e7ad7ade3e..f6690935416 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -1075,10 +1075,10 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; //print ajax_constantonoff("MAIN_OPTIMIZEFORTEXTBROWSER", array(), null, 0, 0, 1, 0); if ($edit) { - print $form->selectyesno('MAIN_OPTIMIZEFORTEXTBROWSER', $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER, 1); + print $form->selectyesno('MAIN_OPTIMIZEFORTEXTBROWSER', (isset($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER : 0), 1); } else { if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { - print yn($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER); + print yn(isset($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER : 0); } else { print yn(1); if (empty($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) { @@ -1128,7 +1128,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) ); if ($edit) { - print $form->selectArray('MAIN_OPTIMIZEFORCOLORBLIND', $colorBlindOptions, $fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND, 0); + print $form->selectArray('MAIN_OPTIMIZEFORCOLORBLIND', $colorBlindOptions, (isset($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) ? $fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND : 0), 0); } else { if (!empty($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) && isset($colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND])) { print $colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND]; diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 954949e427c..8af5736b63e 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -713,7 +713,7 @@ class InterfaceActionsAuto extends DolibarrTriggers // Load translation files required by the page $langs->loadLangs(array("agenda", "other", "members")); - $member = $this->context['member']; + $member = (isset($this->context['member']) ? $this->context['member'] : null); if (!is_object($member)) { // This should not happen dol_syslog("Execute a trigger MEMBER_SUBSCRIPTION_CREATE with context key 'member' not an object"); include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; @@ -731,7 +731,7 @@ class InterfaceActionsAuto extends DolibarrTriggers $object->actionmsg .= "\n".$langs->transnoentities("Period").': '.dol_print_date($object->dateh, 'day').' - '.dol_print_date($object->datef, 'day'); $object->sendtoid = 0; - if ($object->fk_soc > 0) { + if ( isset($object->fk_soc) && $object->fk_soc > 0) { $object->socid = $object->fk_soc; } } elseif ($action == 'MEMBER_SUBSCRIPTION_MODIFY') { @@ -767,12 +767,12 @@ class InterfaceActionsAuto extends DolibarrTriggers } $object->actionmsg = $langs->transnoentities("MemberSubscriptionDeletedInDolibarr", $object->ref, $object->getFullName($langs)); $object->actionmsg .= "\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); - $object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type; - $object->actionmsg .= "\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount; - $object->actionmsg .= "\n".$langs->transnoentities("Period").': '.dol_print_date($object->last_subscription_date_start, 'day').' - '.dol_print_date($object->last_subscription_date_end, 'day'); + $object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->fk_type; + $object->actionmsg .= "\n".$langs->transnoentities("Amount").': '.$object->amount; + $object->actionmsg .= "\n".$langs->transnoentities("Period").': '.dol_print_date($object->dateh, 'day').' - '.dol_print_date($object->datef, 'day'); $object->sendtoid = 0; - if ($object->fk_soc > 0) { + if (isset($object->fk_soc) && $object->fk_soc > 0) { $object->socid = $object->fk_soc; } } elseif ($action == 'MEMBER_RESILIATE') { diff --git a/htdocs/partnership/partnership_agenda.php b/htdocs/partnership/partnership_agenda.php index 02580c1f73a..3e62e6453de 100644 --- a/htdocs/partnership/partnership_agenda.php +++ b/htdocs/partnership/partnership_agenda.php @@ -37,6 +37,7 @@ $langs->loadLangs(array("partnership", "other")); // Get parameters $id = GETPOST('id', 'int'); +$socid = GETPOST('socid', 'int'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/partnership/partnership_card.php b/htdocs/partnership/partnership_card.php index 279b72593da..969fea1673d 100644 --- a/htdocs/partnership/partnership_card.php +++ b/htdocs/partnership/partnership_card.php @@ -42,7 +42,7 @@ $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'partnershipcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -//$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOST('lineid', 'int'); // Initialize technical objects $object = new Partnership($db); @@ -434,6 +434,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } }*/ $morehtmlref .= '
'; + if (!isset($npfilter)) { + $npfilter = ""; + } if ($managedfor == 'member') $npfilter .= " AND te.fk_member > 0 "; else $npfilter .= " AND te.fk_soc > 0 "; $object->next_prev_filter = $npfilter; diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 61bb3472c56..9d5fb5f122f 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1469,6 +1469,7 @@ if ($source == 'contractline') { if ($source == 'member' || $source == 'membersubscription') { $newsource = 'member'; + $tag=""; $found = true; $langs->load("members"); diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index 0551532b00f..fd4d7f15f9e 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -814,19 +814,19 @@ foreach ($object->fields as $key => $val) { print ''; } elseif ($key == 'type_code') { print ''; - $formTicket->selectTypesTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key.'', '', 2, 1, 1, 0, ($val['css'] ? $val['css'] : 'maxwidth150')); + $formTicket->selectTypesTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key.'', '', 2, 1, 1, 0, (!empty($val['css']) ? $val['css'] : 'maxwidth150')); print ''; } elseif ($key == 'category_code') { print ''; - $formTicket->selectGroupTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key.'', '', 2, 1, 1, 0, ($val['css'] ? $val['css'] : 'maxwidth150')); + $formTicket->selectGroupTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key.'', '', 2, 1, 1, 0, (!empty($val['css']) ? $val['css'] : 'maxwidth150')); print ''; } elseif ($key == 'severity_code') { print ''; - $formTicket->selectSeveritiesTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key.'', '', 2, 1, 1, 0, ($val['css'] ? $val['css'] : 'maxwidth150')); + $formTicket->selectSeveritiesTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key.'', '', 2, 1, 1, 0, (!empty($val['css']) ? $val['css'] : 'maxwidth150')); print ''; } elseif ($key == 'fk_user_assign' || $key == 'fk_user_create') { print ''; - print $form->select_dolusers((empty($search[$key]) ? '' : $search[$key]), 'search_'.$key, 1, null, 0, '', '', '0', 0, 0, '', 0, '', ($val['css'] ? $val['css'] : 'maxwidth100')); + print $form->select_dolusers((empty($search[$key]) ? '' : $search[$key]), 'search_'.$key, 1, null, 0, '', '', '0', 0, 0, '', 0, '', (!empty($val['css']) ? $val['css'] : 'maxwidth100')); print ''; } elseif ($key == 'fk_statut') { $arrayofstatus = array(); diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 2f5aa1cca30..524d4589c8e 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -2583,6 +2583,7 @@ if ($action == 'create' || $action == 'adduserldap') { $cate_arbo = $form->select_all_categories(Categorie::TYPE_USER, null, null, null, null, 1); $c = new Categorie($db); $cats = $c->containing($object->id, Categorie::TYPE_USER); + $arrayselected = array(); foreach ($cats as $cat) { $arrayselected[] = $cat->id; } diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index c25fe18f4ee..a056bbd30df 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -320,7 +320,7 @@ if ($action == 'edit') { print '> '; print ''."\n"; $tmplist = array(''=>' ', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser")); - print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $object->conf->AGENDA_DEFAULT_VIEW, 0, 0, 0, ''); + print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, (isset($object->conf->AGENDA_DEFAULT_VIEW) ? $object->conf->AGENDA_DEFAULT_VIEW : ''), 0, 0, 0, ''); print ''."\n"; // Max size of lists