@@ -43,15 +43,15 @@ discard block |
||
| 43 | 43 | * \brief Example of form to suggest a booth |
| 44 | 44 | */ |
| 45 | 45 | |
| 46 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 46 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 47 | 47 | Functions::defineIfNotDefined('NOCSRFCHECK', 1); // We accept to go on this page from external web site. |
| 48 | 48 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 49 | -Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 49 | +Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 50 | 50 | |
| 51 | 51 | // For MultiCompany module. |
| 52 | 52 | // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php |
| 53 | 53 | // Because 2 entities can have the same ref. |
| 54 | -$entity = (!empty($_GET['entity']) ? (int)$_GET['entity'] : (!empty($_POST['entity']) ? (int)$_POST['entity'] : 1)); |
|
| 54 | +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); |
|
| 55 | 55 | if (is_numeric($entity)) { |
| 56 | 56 | define("DOLENTITY", $entity); |
| 57 | 57 | } |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | $error++; |
| 207 | 207 | $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email")) . "<br>\n"; |
| 208 | 208 | } |
| 209 | - if (!GETPOST("country_id") && !empty((float)$project->price_booth)) { |
|
| 209 | + if (!GETPOST("country_id") && !empty((float) $project->price_booth)) { |
|
| 210 | 210 | $error++; |
| 211 | 211 | $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Country")) . "<br>\n"; |
| 212 | 212 | } |
@@ -291,11 +291,11 @@ discard block |
||
| 291 | 291 | if ($resultcontact <= 0) { |
| 292 | 292 | // Need to create a contact |
| 293 | 293 | $contact->socid = $thirdparty->id; |
| 294 | - $contact->lastname = (string)GETPOST("lastname", 'alpha'); |
|
| 295 | - $contact->firstname = (string)GETPOST("firstname", 'alpha'); |
|
| 296 | - $contact->address = (string)GETPOST("address", 'alpha'); |
|
| 297 | - $contact->zip = (string)GETPOST("zipcode", 'alpha'); |
|
| 298 | - $contact->town = (string)GETPOST("town", 'alpha'); |
|
| 294 | + $contact->lastname = (string) GETPOST("lastname", 'alpha'); |
|
| 295 | + $contact->firstname = (string) GETPOST("firstname", 'alpha'); |
|
| 296 | + $contact->address = (string) GETPOST("address", 'alpha'); |
|
| 297 | + $contact->zip = (string) GETPOST("zipcode", 'alpha'); |
|
| 298 | + $contact->town = (string) GETPOST("town", 'alpha'); |
|
| 299 | 299 | $contact->country_id = GETPOSTINT("country_id"); |
| 300 | 300 | $contact->state_id = GETPOSTINT("state_id"); |
| 301 | 301 | $contact->email = $email; |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | $errmsg .= $conforbooth->error; |
| 412 | 412 | } else { |
| 413 | 413 | // If this is a paying booth, we have to redirect to payment page and create an invoice |
| 414 | - if (!empty((float)$project->price_booth)) { |
|
| 414 | + if (!empty((float) $project->price_booth)) { |
|
| 415 | 415 | $productforinvoicerow = new Product($db); |
| 416 | 416 | $resultprod = $productforinvoicerow->fetch(getDolGlobalString('SERVICE_BOOTH_LOCATION')); |
| 417 | 417 | if ($resultprod < 0) { |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | if (!$error) { |
| 450 | 450 | // Add line to draft invoice |
| 451 | 451 | $vattouse = get_default_tva($mysoc, $thirdparty, $productforinvoicerow->id); |
| 452 | - $result = $facture->addline($langs->trans("BoothLocationFee", $conforbooth->label, dol_print_date($conforbooth->datep, '%d/%m/%y %H:%M:%S'), dol_print_date($conforbooth->datep2, '%d/%m/%y %H:%M:%S')), (float)$project->price_booth, 1, $vattouse, 0, 0, $productforinvoicerow->id, 0, dol_now(), '', 0, 0, '', 'HT', 0, 1); |
|
| 452 | + $result = $facture->addline($langs->trans("BoothLocationFee", $conforbooth->label, dol_print_date($conforbooth->datep, '%d/%m/%y %H:%M:%S'), dol_print_date($conforbooth->datep2, '%d/%m/%y %H:%M:%S')), (float) $project->price_booth, 1, $vattouse, 0, 0, $productforinvoicerow->id, 0, dol_now(), '', 0, 0, '', 'HT', 0, 1); |
|
| 453 | 453 | if ($result <= 0) { |
| 454 | 454 | $contact->error = $facture->error; |
| 455 | 455 | $contact->errors = $facture->errors; |
@@ -39,16 +39,16 @@ discard block |
||
| 39 | 39 | * \brief Example of form to suggest a conference |
| 40 | 40 | */ |
| 41 | 41 | |
| 42 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 42 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 43 | 43 | Functions::defineIfNotDefined('NOCSRFCHECK', 1); // We accept to go on this page from external web site. |
| 44 | 44 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 45 | -Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 45 | +Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 46 | 46 | |
| 47 | 47 | |
| 48 | 48 | // For MultiCompany module. |
| 49 | 49 | // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php |
| 50 | 50 | // Because 2 entities can have the same ref. |
| 51 | -$entity = (!empty($_GET['entity']) ? (int)$_GET['entity'] : (!empty($_POST['entity']) ? (int)$_POST['entity'] : 1)); |
|
| 51 | +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); |
|
| 52 | 52 | if (is_numeric($entity)) { |
| 53 | 53 | define("DOLENTITY", $entity); |
| 54 | 54 | } |
@@ -289,11 +289,11 @@ discard block |
||
| 289 | 289 | if ($resultcontact <= 0) { |
| 290 | 290 | // Need to create a contact |
| 291 | 291 | $contact->socid = $thirdparty->id; |
| 292 | - $contact->lastname = (string)GETPOST("lastname", 'alpha'); |
|
| 293 | - $contact->firstname = (string)GETPOST("firstname", 'alpha'); |
|
| 294 | - $contact->address = (string)GETPOST("address", 'alpha'); |
|
| 295 | - $contact->zip = (string)GETPOST("zipcode", 'alpha'); |
|
| 296 | - $contact->town = (string)GETPOST("town", 'alpha'); |
|
| 292 | + $contact->lastname = (string) GETPOST("lastname", 'alpha'); |
|
| 293 | + $contact->firstname = (string) GETPOST("firstname", 'alpha'); |
|
| 294 | + $contact->address = (string) GETPOST("address", 'alpha'); |
|
| 295 | + $contact->zip = (string) GETPOST("zipcode", 'alpha'); |
|
| 296 | + $contact->town = (string) GETPOST("town", 'alpha'); |
|
| 297 | 297 | $contact->country_id = GETPOSTINT("country_id"); |
| 298 | 298 | $contact->state_id = GETPOSTINT("state_id"); |
| 299 | 299 | $contact->email = $email; |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | if (!$error) { |
| 462 | 462 | $db->commit(); |
| 463 | 463 | $securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth' . $id, 2); |
| 464 | - $redirection = $dolibarr_main_url_root . '/public/eventorganization/subscriptionok.php?id=' . ((int)$id) . '&securekey=' . urlencode($securekeyurl); |
|
| 464 | + $redirection = $dolibarr_main_url_root . '/public/eventorganization/subscriptionok.php?id=' . ((int) $id) . '&securekey=' . urlencode($securekeyurl); |
|
| 465 | 465 | header("Location: " . $redirection); |
| 466 | 466 | exit; |
| 467 | 467 | } else { |
@@ -29,15 +29,15 @@ discard block |
||
| 29 | 29 | * \brief File to offer a way to suggest a conference or a booth for an event |
| 30 | 30 | */ |
| 31 | 31 | |
| 32 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 32 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 33 | 33 | Functions::defineIfNotDefined('NOCSRFCHECK', 1); // We accept to go on this page from external web site. |
| 34 | 34 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 35 | -Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 35 | +Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 36 | 36 | |
| 37 | 37 | // For MultiCompany module. |
| 38 | 38 | // Do not use GETPOST here, function is not defined and get of entity must be done before including main.inc.php |
| 39 | 39 | // Because 2 entities can have the same ref. |
| 40 | -$entity = (!empty($_GET['entity']) ? (int)$_GET['entity'] : (!empty($_POST['entity']) ? (int)$_POST['entity'] : (!empty($_GET['e']) ? (int)$_GET['e'] : (!empty($_POST['e']) ? (int)$_POST['e'] : 1)))); |
|
| 40 | +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1)))); |
|
| 41 | 41 | if (is_numeric($entity)) { |
| 42 | 42 | define("DOLENTITY", $entity); |
| 43 | 43 | } |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $action = GETPOST('action', 'aZ09'); |
| 61 | 61 | $id = GETPOSTINT('id'); |
| 62 | 62 | $securekeyreceived = GETPOST("securekey", 'alpha'); |
| 63 | -$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth' . ((int)$id), 'md5'); |
|
| 63 | +$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth' . ((int) $id), 'md5'); |
|
| 64 | 64 | |
| 65 | 65 | if ($securekeytocompare != $securekeyreceived) { |
| 66 | 66 | print $langs->trans('MissingOrBadSecureKey'); |
@@ -30,15 +30,15 @@ |
||
| 30 | 30 | * \brief File to offer a way to make a payment for a particular Dolibarr object |
| 31 | 31 | */ |
| 32 | 32 | |
| 33 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 33 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 34 | 34 | Functions::defineIfNotDefined('NOCSRFCHECK', 1); // We accept to go on this page from external web site. |
| 35 | 35 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 36 | -Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 36 | +Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 37 | 37 | |
| 38 | 38 | // For MultiCompany module. |
| 39 | 39 | // Do not use GETPOST here, function is not defined and get of entity must be done before including main.inc.php |
| 40 | 40 | // Because 2 entities can have the same ref. |
| 41 | -$entity = (!empty($_GET['entity']) ? (int)$_GET['entity'] : (!empty($_POST['entity']) ? (int)$_POST['entity'] : (!empty($_GET['e']) ? (int)$_GET['e'] : (!empty($_POST['e']) ? (int)$_POST['e'] : 1)))); |
|
| 41 | +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1)))); |
|
| 42 | 42 | if (is_numeric($entity)) { |
| 43 | 43 | define("DOLENTITY", $entity); |
| 44 | 44 | } |
@@ -30,11 +30,11 @@ discard block |
||
| 30 | 30 | * \brief Execute pendings jobs |
| 31 | 31 | */ |
| 32 | 32 | |
| 33 | -Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 34 | -Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 33 | +Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 34 | +Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 35 | 35 | Functions::defineIfNotDefined('NOREQUIREHTML', 1); // If we don't need to load the html.form.class.php |
| 36 | 36 | Functions::defineIfNotDefined('NOREQUIREAJAX', 1); // Do not load ajax.lib.php library |
| 37 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 37 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 38 | 38 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 39 | 39 | |
| 40 | 40 | // So log file will have a suffix |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | // For MultiCompany module. |
| 46 | 46 | // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php |
| 47 | 47 | // Because 2 entities can have the same ref |
| 48 | -$entity = (!empty($_GET['entity']) ? (int)$_GET['entity'] : (!empty($_POST['entity']) ? (int)$_POST['entity'] : 1)); |
|
| 48 | +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); |
|
| 49 | 49 | if (is_numeric($entity)) { |
| 50 | 50 | define("DOLENTITY", $entity); |
| 51 | 51 | } |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | //If date_next_jobs is less of current date, execute the program, and store the execution time of the next execution in database |
| 185 | - $datenextrunok = (empty($line->datenextrun) || (int)$line->datenextrun < $now); |
|
| 185 | + $datenextrunok = (empty($line->datenextrun) || (int) $line->datenextrun < $now); |
|
| 186 | 186 | $datestartok = (empty($line->datestart) || $line->datestart <= $now); |
| 187 | 187 | $dateendok = (empty($line->dateend) || $line->dateend >= $now); |
| 188 | 188 | if ($datenextrunok && $datestartok && $dateendok) { |
@@ -38,15 +38,15 @@ discard block |
||
| 38 | 38 | * Example of URL: https://localhost/public/onlinesign/newonlinesign.php?ref=PR... |
| 39 | 39 | */ |
| 40 | 40 | |
| 41 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 41 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 42 | 42 | Functions::defineIfNotDefined('NOCSRFCHECK', 1); // We accept to go on this page from external web site. |
| 43 | 43 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 44 | -Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 44 | +Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 45 | 45 | |
| 46 | 46 | // For MultiCompany module. |
| 47 | 47 | // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php |
| 48 | 48 | // Because 2 entities can have the same ref. |
| 49 | -$entity = (!empty($_GET['entity']) ? (int)$_GET['entity'] : (!empty($_POST['entity']) ? (int)$_POST['entity'] : 1)); |
|
| 49 | +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); |
|
| 50 | 50 | if (is_numeric($entity)) { |
| 51 | 51 | define("DOLENTITY", $entity); |
| 52 | 52 | } |
@@ -116,8 +116,8 @@ discard block |
||
| 116 | 116 | $urlko .= 'securekey=' . urlencode($SECUREKEY) . '&'; |
| 117 | 117 | } |
| 118 | 118 | if (!empty($entity)) { |
| 119 | - $urlok .= 'entity=' . urlencode((string)($entity)) . '&'; |
|
| 120 | - $urlko .= 'entity=' . urlencode((string)($entity)) . '&'; |
|
| 119 | + $urlok .= 'entity=' . urlencode((string) ($entity)) . '&'; |
|
| 120 | + $urlko .= 'entity=' . urlencode((string) ($entity)) . '&'; |
|
| 121 | 121 | } |
| 122 | 122 | $urlok = preg_replace('/&$/', '', $urlok); // Remove last & |
| 123 | 123 | $urlko = preg_replace('/&$/', '', $urlko); // Remove last & |
@@ -179,8 +179,8 @@ discard block |
||
| 179 | 179 | $db->begin(); |
| 180 | 180 | |
| 181 | 181 | $sql = "UPDATE " . MAIN_DB_PREFIX . "propal"; |
| 182 | - $sql .= " SET fk_statut = " . ((int)$object::STATUS_NOTSIGNED) . ", note_private = '" . $db->escape($object->note_private) . "', date_signature='" . $db->idate(dol_now()) . "'"; |
|
| 183 | - $sql .= " WHERE rowid = " . ((int)$object->id); |
|
| 182 | + $sql .= " SET fk_statut = " . ((int) $object::STATUS_NOTSIGNED) . ", note_private = '" . $db->escape($object->note_private) . "', date_signature='" . $db->idate(dol_now()) . "'"; |
|
| 183 | + $sql .= " WHERE rowid = " . ((int) $object->id); |
|
| 184 | 184 | |
| 185 | 185 | dol_syslog(__FILE__, LOG_DEBUG); |
| 186 | 186 | $resql = $db->query($sql); |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT . '/' . $object->last_main_doc)) { |
| 406 | 406 | // It seems document has never been generated, or was generated and then deleted. |
| 407 | 407 | // So we try to regenerate it with its default template. |
| 408 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 408 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 409 | 409 | $object->generateDocument($defaulttemplate, $langs); |
| 410 | 410 | } |
| 411 | 411 | |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT . '/' . $object->last_main_doc)) { |
| 477 | 477 | // It seems document has never been generated, or was generated and then deleted. |
| 478 | 478 | // So we try to regenerate it with its default template. |
| 479 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 479 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 480 | 480 | $object->generateDocument($defaulttemplate, $langs); |
| 481 | 481 | } |
| 482 | 482 | |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT . '/' . $object->last_main_doc)) { |
| 528 | 528 | // It seems document has never been generated, or was generated and then deleted. |
| 529 | 529 | // So we try to regenerate it with its default template. |
| 530 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 530 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 531 | 531 | $object->generateDocument($defaulttemplate, $langs); |
| 532 | 532 | } |
| 533 | 533 | |
@@ -633,7 +633,7 @@ discard block |
||
| 633 | 633 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT . '/' . $object->last_main_doc)) { |
| 634 | 634 | // It seems document has never been generated, or was generated and then deleted. |
| 635 | 635 | // So we try to regenerate it with its default template. |
| 636 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 636 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 637 | 637 | $object->generateDocument($defaulttemplate, $langs); |
| 638 | 638 | } |
| 639 | 639 | $directdownloadlink = $object->getLastMainDocLink('', 0, 0); |
@@ -682,7 +682,7 @@ discard block |
||
| 682 | 682 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT . '/' . $object->last_main_doc)) { |
| 683 | 683 | // It seems document has never been generated, or was generated and then deleted. |
| 684 | 684 | // So we try to regenerate it with its default template. |
| 685 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 685 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 686 | 686 | $object->generateDocument($defaulttemplate, $langs); |
| 687 | 687 | } |
| 688 | 688 | |
@@ -774,7 +774,7 @@ discard block |
||
| 774 | 774 | success: function(response) { |
| 775 | 775 | if (response == "success"){ |
| 776 | 776 | console.log("Success on saving signature"); |
| 777 | - window.location.replace("' . $_SERVER["PHP_SELF"] . '?ref=' . urlencode($ref) . '&source=' . urlencode($source) . '&message=signed&securekey=' . urlencode($SECUREKEY) . (isModEnabled('multicompany') ? '&entity=' . (int)$entity : '') . '"); |
|
| 777 | + window.location.replace("' . $_SERVER["PHP_SELF"] . '?ref=' . urlencode($ref) . '&source=' . urlencode($source) . '&message=signed&securekey=' . urlencode($SECUREKEY) . (isModEnabled('multicompany') ? '&entity=' . (int) $entity : '') . '"); |
|
| 778 | 778 | } else { |
| 779 | 779 | document.body.style.cursor = \'auto\'; |
| 780 | 780 | console.error(response); |
@@ -34,10 +34,10 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | |
| 36 | 36 | Functions::defineIfNotDefined('WEBPORTAL', 1); |
| 37 | -Functions::defineIfNotDefined('NOLOGIN', 1); // No login needed |
|
| 38 | -Functions::defineIfNotDefined('NOREQUIREUSER', 1); // No user needed |
|
| 39 | -Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 40 | -Functions::defineIfNotDefined('NOREQUIRESOC', 1); // No company needed |
|
| 37 | +Functions::defineIfNotDefined('NOLOGIN', 1); // No login needed |
|
| 38 | +Functions::defineIfNotDefined('NOREQUIREUSER', 1); // No user needed |
|
| 39 | +Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 40 | +Functions::defineIfNotDefined('NOREQUIRESOC', 1); // No company needed |
|
| 41 | 41 | Functions::defineIfNotDefined('EVEN_IF_ONLY_LOGIN_ALLOWED', 1); |
| 42 | 42 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 43 | 43 | |
@@ -58,8 +58,7 @@ discard block |
||
| 58 | 58 | $dolibarr_main_cookie_cryptkey; // This is loaded by filefunc.inc.php |
| 59 | 59 | |
| 60 | 60 | $tmp_instance_unique_id = empty($dolibarr_main_instance_unique_id) ? |
| 61 | - (empty($dolibarr_main_cookie_cryptkey) ? '' : |
|
| 62 | - $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id; |
|
| 61 | + (empty($dolibarr_main_cookie_cryptkey) ? '' : $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id; |
|
| 63 | 62 | // Unique id of instance |
| 64 | 63 | |
| 65 | 64 | // The recommended value (may be not defined for old versions) |
@@ -28,11 +28,11 @@ |
||
| 28 | 28 | |
| 29 | 29 | //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language |
| 30 | 30 | //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url. |
| 31 | -Functions::defineIfNotDefined('NOREQUIRESOC', 1); // No company needed |
|
| 31 | +Functions::defineIfNotDefined('NOREQUIRESOC', 1); // No company needed |
|
| 32 | 32 | //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations |
| 33 | -Functions::defineIfNotDefined('NOCSRFCHECK', 1); // Do not check anti CSRF attack test |
|
| 34 | -Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 35 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login. |
|
| 33 | +Functions::defineIfNotDefined('NOCSRFCHECK', 1); // Do not check anti CSRF attack test |
|
| 34 | +Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 35 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login. |
|
| 36 | 36 | //if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); // We load menu manager class (note that object loaded may have wrong content because NOLOGIN is set and some values depends on login) |
| 37 | 37 | Functions::defineIfNotDefined('NOREQUIREHTML', 1); // If we don't need to load the html.form.class.php |
| 38 | 38 | Functions::defineIfNotDefined('NOREQUIREAJAX', 1); // Do not load ajax.lib.php library |
@@ -27,10 +27,10 @@ |
||
| 27 | 27 | |
| 28 | 28 | //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language |
| 29 | 29 | //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url. |
| 30 | -Functions::defineIfNotDefined('NOREQUIRESOC', 1); // No company needed |
|
| 30 | +Functions::defineIfNotDefined('NOREQUIRESOC', 1); // No company needed |
|
| 31 | 31 | //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations |
| 32 | -Functions::defineIfNotDefined('NOCSRFCHECK', 1); // Do not check anti CSRF attack test |
|
| 33 | -Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 32 | +Functions::defineIfNotDefined('NOCSRFCHECK', 1); // Do not check anti CSRF attack test |
|
| 33 | +Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 34 | 34 | if (!defined('NOLOGIN')) { |
| 35 | 35 | define('NOLOGIN', 1); // File must be accessed by logon page so without login. |
| 36 | 36 | } |