This commit is contained in:
Dorian Vabre 2021-05-10 15:31:52 +02:00
parent 0e62edfd42
commit c5dc20b9dc
2 changed files with 3 additions and 4 deletions

View File

@ -180,18 +180,17 @@ if (strlen($idvote)) {
// Cookie duration by default
$timeleftbeforestartofevent = time()+86400*30;
}
// Process to vote
$res = setcookie('VOTE_SUGGESTED_EVENTS_'.$hashedvote, 1, 0);
if ($res) {
$conforbooth->num_vote++;
$resupdate = $conforbooth->update($user);
if ($resupdate) {
$votestatus = 'ok';
$res = setcookie('VOTE_SUGGESTED_EVENTS_'.$hashedvote, 1, 0);
} else {
//Error during update
$votestatus = 'err';
$res = setcookie('VOTE_SUGGESTED_EVENTS_'.$hashedvote, 0, 0);
}
} else {
$votestatus = 'err';

View File

@ -2467,7 +2467,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '</tr>';
}
// Supplier code
// Su+pplier code
if (((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) && $object->fournisseur) {
print '<tr><td>';
print $langs->trans('SupplierCode').'</td><td>';