@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | if ($user->socid > 0) { |
98 | 98 | accessforbidden(); |
99 | 99 | } |
100 | -$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0); |
|
100 | +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); |
|
101 | 101 | $result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'id', $isdraft); |
102 | 102 | |
103 | 103 | if (!$permissiontoread) { |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $projectstatic->fetch_thirdparty(); |
187 | 187 | } |
188 | 188 | |
189 | -$withProjectUrl=''; |
|
189 | +$withProjectUrl = ''; |
|
190 | 190 | $object->project = clone $projectstatic; |
191 | 191 | |
192 | 192 | if (!empty($withproject)) { |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field |
572 | 572 | //unset($object->fields['fk_project']); // Hide field already shown in banner |
573 | 573 | //unset($object->fields['fk_soc']); // Hide field already shown in banner |
574 | - $keyforbreak='num_vote'; |
|
574 | + $keyforbreak = 'num_vote'; |
|
575 | 575 | |
576 | 576 | include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; |
577 | 577 | |
@@ -643,12 +643,12 @@ discard block |
||
643 | 643 | |
644 | 644 | $object->fetchObjectLinked(); |
645 | 645 | |
646 | - if (is_array($object->linkedObjects) && count($object->linkedObjects)>0 && array_key_exists("facture", $object->linkedObjects)) { |
|
646 | + if (is_array($object->linkedObjects) && count($object->linkedObjects) > 0 && array_key_exists("facture", $object->linkedObjects)) { |
|
647 | 647 | foreach ($object->linkedObjects["facture"] as $fac) { |
648 | 648 | if (empty($fac->paye)) { |
649 | 649 | $key = 'paymentlink_'.$fac->id; |
650 | 650 | |
651 | - print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv('Online')) . ' '. $fac->ref.'</span><br>'; |
|
651 | + print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv('Online')).' '.$fac->ref.'</span><br>'; |
|
652 | 652 | |
653 | 653 | $sourcetouse = 'boothlocation'; |
654 | 654 | $reftouse = $fac->id; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothattendeecard'; // To manage different context of search |
48 | 48 | $backtopage = GETPOST('backtopage', 'alpha'); |
49 | 49 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
50 | -$lineid = GETPOST('lineid', 'int'); |
|
50 | +$lineid = GETPOST('lineid', 'int'); |
|
51 | 51 | $mode = GETPOST('mode', 'alpha'); |
52 | 52 | |
53 | 53 | $conf_or_booth_id = GETPOST('conforboothid', 'int'); |
@@ -606,15 +606,15 @@ discard block |
||
606 | 606 | if (empty($reshook)) { |
607 | 607 | // Send |
608 | 608 | if (empty($user->socid)) { |
609 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle'); |
|
609 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id) ? '&conforboothid='.$confOrBooth->id : '').(!empty($projectstatic->id) ? '&fk_project='.$projectstatic->id : '').'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle'); |
|
610 | 610 | } |
611 | - print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').'&action=edit&token='.newToken(), '', $permissiontoadd); |
|
611 | + print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id) ? '&conforboothid='.$confOrBooth->id : '').(!empty($projectstatic->id) ? '&fk_project='.$projectstatic->id : '').'&action=edit&token='.newToken(), '', $permissiontoadd); |
|
612 | 612 | |
613 | 613 | // Clone |
614 | - print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=clone&token='.newToken().(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:''), '', $permissiontoadd); |
|
614 | + print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=clone&token='.newToken().(!empty($projectstatic->id) ? '&fk_project='.$projectstatic->id : ''), '', $permissiontoadd); |
|
615 | 615 | |
616 | 616 | // Delete (need delete permission, or if draft, just need create/modify permission) |
617 | - print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken().(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:''), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); |
|
617 | + print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken().(!empty($projectstatic->id) ? '&fk_project='.$projectstatic->id : ''), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); |
|
618 | 618 | } |
619 | 619 | print '</div>'."\n"; |
620 | 620 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $search_date_endday = GETPOST('search_date_endday', 'int'); |
93 | 93 | $search_date_endmonth = GETPOST('search_date_endmonth', 'int'); |
94 | 94 | $search_date_endyear = GETPOST('search_date_endyear', 'int'); |
95 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
95 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
96 | 96 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
97 | 97 | $search_datelimit_startday = GETPOST('search_datelimit_startday', 'int'); |
98 | 98 | $search_datelimit_startmonth = GETPOST('search_datelimit_startmonth', 'int'); |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | if ($searchCategoryProjectOperator == 0) { |
468 | 468 | $searchCategoryProjectSqlList[] = " EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project AND ck.fk_categorie = ".((int) $searchCategoryProject).")"; |
469 | 469 | } else { |
470 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProject); |
|
470 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProject); |
|
471 | 471 | } |
472 | 472 | } |
473 | 473 | } |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | // Direct jump if only one record found |
587 | 587 | if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) { |
588 | 588 | $obj = $db->fetch_object($resql); |
589 | - $id = $obj->id; // in select, task id has been aliases into 'id' |
|
589 | + $id = $obj->id; // in select, task id has been aliases into 'id' |
|
590 | 590 | header("Location: ".DOL_URL_ROOT.'/projet/tasks/task.php?id='.$id.'&withproject=1'); |
591 | 591 | exit; |
592 | 592 | } |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | // Output page |
596 | 596 | // -------------------------------------------------------------------- |
597 | 597 | |
598 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
598 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
599 | 599 | |
600 | 600 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
601 | 601 | |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | if ($search_date_endyear) { |
628 | 628 | $param .= '&search_date_endyear='.urlencode($search_date_endyear); |
629 | 629 | } |
630 | -if ($search_datelimit_startday) { |
|
630 | +if ($search_datelimit_startday) { |
|
631 | 631 | $param .= '&search_datelimit_startday='.urlencode($search_datelimit_startday); |
632 | 632 | } |
633 | 633 | if ($search_datelimit_startmonth) { |
@@ -815,7 +815,7 @@ discard block |
||
815 | 815 | $categoriesArr[-2] = '- '.$langs->trans('NotCategorized').' -'; |
816 | 816 | $moreforfilter .= Form::multiselectarray('search_category_customer_list', $categoriesArr, $searchCategoryCustomerList, 0, 0, 'minwidth300', 0, 0, '', 'category', $tmptitle); |
817 | 817 | $moreforfilter .= ' <input type="checkbox" class="valignmiddle" id="search_category_customer_operator" name="search_category_customer_operator" value="1"'.($searchCategoryCustomerOperator == 1 ? ' checked="checked"' : '').'/>'; |
818 | - $moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories') . ' : ' . $tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click |
|
818 | + $moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories').' : '.$tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click |
|
819 | 819 | $moreforfilter .= '</div>'; |
820 | 820 | } |
821 | 821 | |
@@ -1602,7 +1602,7 @@ discard block |
||
1602 | 1602 | if (isset($totalarray['type']) && $totalarray['type'][$i] == 'duration') { |
1603 | 1603 | print (!empty($totalarray['val'][$totalarray['pos'][$i]]) ? convertSecondToTime($totalarray['val'][$totalarray['pos'][$i]], 'allhourmin') : 0); |
1604 | 1604 | } else { |
1605 | - print price(!empty($totalarray['val'][$totalarray['pos'][$i]])?$totalarray['val'][$totalarray['pos'][$i]]:0); |
|
1605 | + print price(!empty($totalarray['val'][$totalarray['pos'][$i]]) ? $totalarray['val'][$totalarray['pos'][$i]] : 0); |
|
1606 | 1606 | } |
1607 | 1607 | print '</td>'; |
1608 | 1608 | } else { |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
123 | 123 | |
124 | 124 | $action = GETPOST('action', 'aZ09'); |
125 | -$original_file = GETPOST('file', 'alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP). |
|
126 | -$hashp = GETPOST('hashp', 'aZ09', 1); // Must be read only by GET |
|
127 | -$modulepart = GETPOST('modulepart', 'alpha', 1); // Must be read only by GET |
|
125 | +$original_file = GETPOST('file', 'alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP). |
|
126 | +$hashp = GETPOST('hashp', 'aZ09', 1); // Must be read only by GET |
|
127 | +$modulepart = GETPOST('modulepart', 'alpha', 1); // Must be read only by GET |
|
128 | 128 | $urlsource = GETPOST('urlsource', 'alpha'); |
129 | 129 | $entity = (GETPOST('entity', 'int') ? GETPOST('entity', 'int') : $conf->entity); |
130 | 130 | |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | if (empty($dolibarr_nocache)) { |
159 | 159 | header('Cache-Control: max-age=3600, public, must-revalidate'); |
160 | 160 | header('Pragma: cache'); // This is to avoid to have Pragma: no-cache set by proxy or web server |
161 | - header('Expires: '.gmdate('D, d M Y H:i:s', time() + 3600).' GMT'); // This is to avoid to have Expires set by proxy or web server |
|
161 | + header('Expires: '.gmdate('D, d M Y H:i:s', time() + 3600).' GMT'); // This is to avoid to have Expires set by proxy or web server |
|
162 | 162 | //header('Expires: '.strtotime('+1 hour'); |
163 | 163 | } else { |
164 | 164 | header('Cache-Control: no-cache'); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | |
217 | 217 | // Security: Delete string ../ or ..\ into $original_file |
218 | -$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
218 | +$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
219 | 219 | $original_file = str_replace('../', '/', $original_file); |
220 | 220 | $original_file = str_replace('..\\', '/', $original_file); |
221 | 221 |
@@ -27,11 +27,11 @@ discard block |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | if (!defined('NOLOGIN')) { |
30 | - define('NOLOGIN', '1'); // If this page is public (can be called outside logged session) |
|
30 | + define('NOLOGIN', '1'); // If this page is public (can be called outside logged session) |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | if (!defined('NOIPCHECK')) { |
34 | - define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
|
34 | + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | if (!defined('NOBROWSERNOTIF')) { |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | print '<br>'; |
92 | 92 | |
93 | 93 | print '<div class="ticketform">'; |
94 | -print '<a href="'.DOL_URL_ROOT.'/public/ticket/create_ticket.php?action=create'.(!empty($entity) && isModEnabled('multicompany')?'&entity='.$entity:'').'&token='.newToken().'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_create bigrounded"><span class="fa fa-15 fa-plus-circle valignmiddle btnTitle-icon"></span><br>'.dol_escape_htmltag($langs->trans("CreateTicket")).'</div></a>'; |
|
95 | -print '<a href="list.php'.(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:'').'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded"><span class="fa fa-15 fa-list-alt valignmiddle btnTitle-icon"></span><br>'.dol_escape_htmltag($langs->trans("ViewMyTicketList")).'</div></a>'; |
|
96 | -print '<a href="view.php'.(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:'').'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded">'.img_picto('', 'ticket', 'class="fa-15"').'<br>'.dol_escape_htmltag($langs->trans("ShowTicketWithTrackId")).'</div></a>'; |
|
94 | +print '<a href="'.DOL_URL_ROOT.'/public/ticket/create_ticket.php?action=create'.(!empty($entity) && isModEnabled('multicompany') ? '&entity='.$entity : '').'&token='.newToken().'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_create bigrounded"><span class="fa fa-15 fa-plus-circle valignmiddle btnTitle-icon"></span><br>'.dol_escape_htmltag($langs->trans("CreateTicket")).'</div></a>'; |
|
95 | +print '<a href="list.php'.(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded"><span class="fa fa-15 fa-list-alt valignmiddle btnTitle-icon"></span><br>'.dol_escape_htmltag($langs->trans("ViewMyTicketList")).'</div></a>'; |
|
96 | +print '<a href="view.php'.(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded">'.img_picto('', 'ticket', 'class="fa-15"').'<br>'.dol_escape_htmltag($langs->trans("ShowTicketWithTrackId")).'</div></a>'; |
|
97 | 97 | print '<div class="clearboth"></div>'; |
98 | -print '</div>'; // ends '<div class="ticketform">'; |
|
99 | -print '</div>'; // ends '<div class="ticketpublicarea ticketlargemargin centpercent">'; |
|
98 | +print '</div>'; // ends '<div class="ticketform">'; |
|
99 | +print '</div>'; // ends '<div class="ticketpublicarea ticketlargemargin centpercent">'; |
|
100 | 100 | |
101 | 101 | if (getDolGlobalInt('TICKET_SHOW_COMPANY_FOOTER')) { |
102 | 102 | // End of page |
@@ -381,9 +381,9 @@ discard block |
||
381 | 381 | $sql .= " AND ((tc.source = 'external'"; |
382 | 382 | $sql .= " AND tc.element='".$db->escape($object->element)."'"; |
383 | 383 | $sql .= " AND tc.active=1"; |
384 | - $sql .= " AND sp.email='".$db->escape($_SESSION['email_customer'])."')"; // email found into an external contact |
|
385 | - $sql .= " OR s.email='".$db->escape($_SESSION['email_customer'])."'"; // or email of the linked company |
|
386 | - $sql .= " OR t.origin_email='".$db->escape($_SESSION['email_customer'])."')"; // or email of the requester |
|
384 | + $sql .= " AND sp.email='".$db->escape($_SESSION['email_customer'])."')"; // email found into an external contact |
|
385 | + $sql .= " OR s.email='".$db->escape($_SESSION['email_customer'])."'"; // or email of the linked company |
|
386 | + $sql .= " OR t.origin_email='".$db->escape($_SESSION['email_customer'])."')"; // or email of the requester |
|
387 | 387 | // Manage filter |
388 | 388 | if (!empty($filter)) { |
389 | 389 | foreach ($filter as $key => $value) { |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | print_barre_liste($langs->trans('TicketList'), $page, 'list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'ticket'); |
420 | 420 | |
421 | 421 | // Search bar |
422 | - print '<form method="POST" action="'.$_SERVER['PHP_SELF'].(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:'').'" id="searchFormList" >'."\n"; |
|
422 | + print '<form method="POST" action="'.$_SERVER['PHP_SELF'].(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'" id="searchFormList" >'."\n"; |
|
423 | 423 | print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
424 | 424 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
425 | 425 | print '<input type="hidden" name="action" value="view_ticketlist">'; |
@@ -430,8 +430,8 @@ discard block |
||
430 | 430 | $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields |
431 | 431 | |
432 | 432 | // allow to display information before list |
433 | - $parameters=array('arrayfields'=>$arrayfields); |
|
434 | - $reshook=$hookmanager->executeHooks('printFieldListHeader', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
433 | + $parameters = array('arrayfields'=>$arrayfields); |
|
434 | + $reshook = $hookmanager->executeHooks('printFieldListHeader', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
435 | 435 | print $hookmanager->resPrint; |
436 | 436 | |
437 | 437 | print '<div class="div-table-responsive">'; |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | |
711 | 711 | print '</form>'; |
712 | 712 | |
713 | - print '<form method="post" id="form_view_ticket" name="form_view_ticket" action="'.dol_buildpath('/public/ticket/view.php', 1).(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:'').'" style="display:none;">'; |
|
713 | + print '<form method="post" id="form_view_ticket" name="form_view_ticket" action="'.dol_buildpath('/public/ticket/view.php', 1).(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'" style="display:none;">'; |
|
714 | 714 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
715 | 715 | print '<input type="hidden" name="action" value="view_ticket">'; |
716 | 716 | print '<input type="hidden" name="btn_view_ticket_list" value="1">'; |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | print '<br>'; |
742 | 742 | |
743 | 743 | print '<div id="form_view_ticket">'; |
744 | - print '<form method="post" name="form_view_ticketlist" action="'.$_SERVER['PHP_SELF'].(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:'').'">'; |
|
744 | + print '<form method="post" name="form_view_ticketlist" action="'.$_SERVER['PHP_SELF'].(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'">'; |
|
745 | 745 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
746 | 746 | print '<input type="hidden" name="action" value="view_ticketlist">'; |
747 | 747 | //print '<input type="hidden" name="search_fk_status" value="non_closed">'; |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | if (!defined("NOSESSION")) { |
46 | 46 | define("NOSESSION", '1'); |
47 | 47 | } |
48 | -if (! defined('NOREQUIREHTML')) { |
|
49 | - define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php |
|
48 | +if (!defined('NOREQUIREHTML')) { |
|
49 | + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php |
|
50 | 50 | } |
51 | -if (! defined('NOREQUIREAJAX')) { |
|
52 | - define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library |
|
51 | +if (!defined('NOREQUIREAJAX')) { |
|
52 | + define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | $mtid = GETPOST('mtid'); |
65 | 65 | $email = GETPOST('email'); |
66 | -$tag = GETPOST('tag'); // To retreive the emailing, and recipient |
|
66 | +$tag = GETPOST('tag'); // To retreive the emailing, and recipient |
|
67 | 67 | $unsuscrib = GETPOST('unsuscrib'); |
68 | 68 | $securitykey = GETPOST('securitykey'); |
69 | 69 |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | return $this->id; |
292 | 292 | } else { |
293 | 293 | $this->db->rollback(); |
294 | - dol_syslog(__METHOD__ . ' ' . $this->error, LOG_ERR); |
|
294 | + dol_syslog(__METHOD__.' '.$this->error, LOG_ERR); |
|
295 | 295 | return -2; |
296 | 296 | } |
297 | 297 | } else { |
@@ -344,12 +344,12 @@ discard block |
||
344 | 344 | } |
345 | 345 | |
346 | 346 | if (!$error) { |
347 | - dol_syslog(__METHOD__ . ' success'); |
|
347 | + dol_syslog(__METHOD__.' success'); |
|
348 | 348 | $this->db->commit(); |
349 | 349 | return 1; |
350 | 350 | } else { |
351 | 351 | $this->db->rollback(); |
352 | - dol_syslog(__METHOD__ . ' ' . $this->error, LOG_ERR); |
|
352 | + dol_syslog(__METHOD__.' '.$this->error, LOG_ERR); |
|
353 | 353 | return -2; |
354 | 354 | } |
355 | 355 | } else { |
@@ -600,8 +600,8 @@ discard block |
||
600 | 600 | } |
601 | 601 | |
602 | 602 | if (!$error) { |
603 | - $sql = "DELETE FROM " . MAIN_DB_PREFIX . "mailing"; |
|
604 | - $sql .= " WHERE rowid = " . ((int) $this->id); |
|
603 | + $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing"; |
|
604 | + $sql .= " WHERE rowid = ".((int) $this->id); |
|
605 | 605 | |
606 | 606 | dol_syslog(__METHOD__, LOG_DEBUG); |
607 | 607 | $resql = $this->db->query($sql); |
@@ -612,12 +612,12 @@ discard block |
||
612 | 612 | } |
613 | 613 | |
614 | 614 | if (!$error) { |
615 | - dol_syslog(__METHOD__ . ' success'); |
|
615 | + dol_syslog(__METHOD__.' success'); |
|
616 | 616 | $this->db->commit(); |
617 | 617 | return 1; |
618 | 618 | } else { |
619 | 619 | $this->db->rollback(); |
620 | - dol_syslog(__METHOD__ . ' ' . $this->error, LOG_ERR); |
|
620 | + dol_syslog(__METHOD__.' '.$this->error, LOG_ERR); |
|
621 | 621 | return -2; |
622 | 622 | } |
623 | 623 | } else { |
@@ -736,7 +736,7 @@ discard block |
||
736 | 736 | $sql .= ' WHERE rowid = '.((int) $this->id); |
737 | 737 | |
738 | 738 | $resqlupdate = $this->db->query($sql); |
739 | - if (! $resqlupdate) { |
|
739 | + if (!$resqlupdate) { |
|
740 | 740 | $this->error = $this->db->lasterror(); |
741 | 741 | return -1; |
742 | 742 | } else { |
@@ -837,7 +837,7 @@ discard block |
||
837 | 837 | $label = $langs->trans("ShowEMailing"); |
838 | 838 | $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; |
839 | 839 | } |
840 | - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
840 | + $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
841 | 841 | $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; |
842 | 842 | } else { |
843 | 843 | $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | } |
355 | 355 | } |
356 | 356 | if (empty($nbemail)) { |
357 | - $nbemail .= ' '.img_warning($langs->trans('ToAddRecipientsChooseHere'));//.' <span class="warning">'.$langs->trans("NoTargetYet").'</span>'; |
|
357 | + $nbemail .= ' '.img_warning($langs->trans('ToAddRecipientsChooseHere')); //.' <span class="warning">'.$langs->trans("NoTargetYet").'</span>'; |
|
358 | 358 | } |
359 | 359 | if ($text) { |
360 | 360 | print $form->textwithpicto($nbemail, $text, 1, 'warning'); |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | print '</div>'; |
418 | 418 | print '</div>'; |
419 | 419 | print '<div class="tagtd"> </div>'; |
420 | - print '</div>'; // End tr |
|
420 | + print '</div>'; // End tr |
|
421 | 421 | |
422 | 422 | clearstatcache(); |
423 | 423 | |
@@ -488,12 +488,12 @@ discard block |
||
488 | 488 | } |
489 | 489 | print img_object($langs->trans("EmailingTargetSelector").': '.get_class($obj), $obj->picto, 'class="valignmiddle width25 size15x"'); |
490 | 490 | print '</div>'; |
491 | - print '<div class="tagtd valignmiddle">'; // style="height: 4em" |
|
491 | + print '<div class="tagtd valignmiddle">'; // style="height: 4em" |
|
492 | 492 | print $obj->getDesc(); |
493 | 493 | print '</div>'; |
494 | 494 | |
495 | 495 | try { |
496 | - $obj->evenunsubscribe = $object->evenunsubscribe; // Set flag to include/exclude email that has opt-out. |
|
496 | + $obj->evenunsubscribe = $object->evenunsubscribe; // Set flag to include/exclude email that has opt-out. |
|
497 | 497 | |
498 | 498 | $nbofrecipient = $obj->getNbOfRecipients(''); |
499 | 499 | } catch (Exception $e) { |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
547 | 547 | print $hookmanager->resPrint; |
548 | 548 | |
549 | - print '</div>'; // End table |
|
549 | + print '</div>'; // End table |
|
550 | 550 | print '</div>'; |
551 | 551 | |
552 | 552 | print '<br>'; |