@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | while ($i < $num) { |
55 | 55 | $row = $db->fetch_row($resql); |
56 | 56 | if ($row[0] == $field) { |
57 | - $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " CHARACTER SET utf8"; // We must not sanitize the $row[1] |
|
57 | + $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " CHARACTER SET utf8"; // We must not sanitize the $row[1] |
|
58 | 58 | $db->query($sql); |
59 | 59 | |
60 | - $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " COLLATE utf8_unicode_ci"; // We must not sanitize the $row[1] |
|
60 | + $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " COLLATE utf8_unicode_ci"; // We must not sanitize the $row[1] |
|
61 | 61 | $db->query($sql); |
62 | 62 | |
63 | 63 | break; |
@@ -75,10 +75,10 @@ discard block |
||
75 | 75 | while ($i < $num) { |
76 | 76 | $row = $db->fetch_row($resql); |
77 | 77 | if ($row[0] == $field) { |
78 | - $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " CHARACTER SET utf8mb4"; // We must not sanitize the $row[1] |
|
78 | + $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " CHARACTER SET utf8mb4"; // We must not sanitize the $row[1] |
|
79 | 79 | $db->query($sql); |
80 | 80 | |
81 | - $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " COLLATE utf8mb4_unicode_ci"; // We must not sanitize the $row[1] |
|
81 | + $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " COLLATE utf8mb4_unicode_ci"; // We must not sanitize the $row[1] |
|
82 | 82 | $db->query($sql); |
83 | 83 | |
84 | 84 | break; |
@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | |
50 | 50 | $parameters = array(); |
51 | -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
51 | +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
52 | 52 | if ($reshook < 0) { |
53 | 53 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
54 | 54 | } |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | print '<tr class="oddeven"><td><label for="logo">' . $form->textwithpicto($langs->trans("Logo"), $tooltiplogo) . '</label></td><td>'; |
532 | 532 | print '<div class="centpercent nobordernopadding valignmiddle "><div class="inline-block marginrightonly">'; |
533 | 533 | if ($maxmin > 0) { |
534 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
534 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
535 | 535 | } |
536 | 536 | print '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="logo" id="logo" accept="image/*">'; |
537 | 537 | print '</div>'; |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | $maxfilesizearray = getMaxFileSizeArray(); |
574 | 574 | $maxmin = $maxfilesizearray['maxmin']; |
575 | 575 | if ($maxmin > 0) { |
576 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
576 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
577 | 577 | } |
578 | 578 | print '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="logo_squarred" id="logo_squarred" accept="image/*">'; |
579 | 579 | print '</div>'; |
@@ -89,7 +89,7 @@ |
||
89 | 89 | // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context |
90 | 90 | $hookmanager->initHooks(array('agendacontract', 'globalcard')); |
91 | 91 | |
92 | -$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
92 | +$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
93 | 93 | |
94 | 94 | $result = restrictedArea($user, 'contrat', $object->id); |
95 | 95 |
@@ -85,7 +85,7 @@ |
||
85 | 85 | $conf->file->main_force_https = empty($dolibarr_main_force_https) ? '' : $dolibarr_main_force_https; // Force https |
86 | 86 | $conf->file->strict_mode = empty($dolibarr_strict_mode) ? '' : $dolibarr_strict_mode; // Force php strict mode (for debug) |
87 | 87 | $conf->file->instance_unique_id = empty($dolibarr_main_instance_unique_id) ? (empty($dolibarr_main_cookie_cryptkey) ? '' : $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id; // Unique id of instance |
88 | -$conf->file->dol_main_url_root = $dolibarr_main_url_root; // Define url inside the config file |
|
88 | +$conf->file->dol_main_url_root = $dolibarr_main_url_root; // Define url inside the config file |
|
89 | 89 | $conf->file->dol_document_root = array('main' => (string) DOL_DOCUMENT_ROOT); // Define array of document root directories ('/home/htdocs') |
90 | 90 | $conf->file->dol_url_root = array('main' => (string) DOL_URL_ROOT); // Define array of url root path ('' or '/dolibarr') |
91 | 91 | if (!empty($dolibarr_main_document_root_alt)) { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | // Default sort order (if not yet defined by previous GETPOST) |
86 | 86 | if (!$sortfield) { |
87 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
87 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
88 | 88 | $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition. |
89 | 89 | } |
90 | 90 | if (!$sortorder) { |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
616 | 616 | $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
617 | 617 | } |
618 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
618 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
619 | 619 | if (!empty($arrayfields['t.' . $key]['checked'])) { |
620 | 620 | print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n"; |
621 | 621 | $totalarray['nbfield']++; |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | if (!empty($arrayfields['t.' . $key]['checked'])) { |
720 | 720 | print '<td' . ($cssforfield ? ' class="' . $cssforfield . (preg_match('/tdoverflow/', $cssforfield) ? ' classfortooltip' : '') . '"' : ''); |
721 | 721 | if (preg_match('/tdoverflow/', $cssforfield) && !is_numeric($object->$key)) { |
722 | - print ' title="' . dol_escape_htmltag(dol_nl2br($object->$key, 1)) . '"'; // We add dol_nl2br for the question and answer fields |
|
722 | + print ' title="' . dol_escape_htmltag(dol_nl2br($object->$key, 1)) . '"'; // We add dol_nl2br for the question and answer fields |
|
723 | 723 | } |
724 | 724 | print '>'; |
725 | 725 | if ($key == 'status') { |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php // BEGIN PHP |
2 | 2 | $websitekey = basename(__DIR__); |
3 | -if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__ . '/master.inc.php'; |
|
3 | +if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { require_once __DIR__ . '/master.inc.php'; |
|
4 | 4 | } // Load env if not already loaded |
5 | 5 | require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/website.lib.php'; |
6 | 6 | require_once constant('DOL_DOCUMENT_ROOT') . '/core/website.inc.php'; |
7 | 7 | ob_start(); |
8 | -if (! headers_sent()) { /* because file is included inline when in edit mode and we don't want warning */ |
|
8 | +if (!headers_sent()) { /* because file is included inline when in edit mode and we don't want warning */ |
|
9 | 9 | header('Cache-Control: max-age=3600, public, must-revalidate'); |
10 | 10 | header('Content-type: text/css'); |
11 | 11 | } |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | $conf->db->name = $dolibarr_main_db_name; |
361 | 361 | $conf->db->user = $dolibarr_main_db_user; |
362 | 362 | $conf->db->pass = $dolibarr_main_db_pass; |
363 | - $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, (int)$conf->db->port); |
|
363 | + $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, (int) $conf->db->port); |
|
364 | 364 | if ($db->connected && $db->database_selected) { |
365 | 365 | $ok = true; |
366 | 366 | } |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | $allowupgrade = true; |
458 | 458 | } |
459 | 459 | |
460 | - $dir = DOL_DOCUMENT_ROOT . "/install/mysql/migration/"; // We use mysql migration scripts whatever is database driver |
|
460 | + $dir = DOL_DOCUMENT_ROOT . "/install/mysql/migration/"; // We use mysql migration scripts whatever is database driver |
|
461 | 461 | dolibarr_install_syslog("Scan sql files for migration files in " . $dir); |
462 | 462 | |
463 | 463 | // Get files list of migration file x.y.z-a.b.c.sql into /install/mysql/migration |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | echo " Display this help message.\n"; |
125 | 125 | } |
126 | 126 | |
127 | -if (php_sapi_name() === "cli" && (float)PHP_VERSION > 7.0) { |
|
127 | +if (php_sapi_name() === "cli" && (float) PHP_VERSION > 7.0) { |
|
128 | 128 | $rest_index = 0; |
129 | 129 | $opts = getopt($short_options, $long_options, $rest_index); |
130 | 130 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * @param string $arg |
150 | 150 | * @return bool |
151 | 151 | */ |
152 | - static function ($arg) { |
|
152 | + static function($arg) { |
|
153 | 153 | return strlen($arg) >= 2 && $arg[0] == '-'; |
154 | 154 | } |
155 | 155 | ); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | * @param string $arg |
160 | 160 | * @return string |
161 | 161 | */ |
162 | - static function ($arg) { |
|
162 | + static function($arg) { |
|
163 | 163 | if (strlen($arg) > 1) { |
164 | 164 | return "--" . $arg; |
165 | 165 | } |
@@ -294,10 +294,10 @@ discard block |
||
294 | 294 | |
295 | 295 | // Check install.lock (for both install and upgrade) |
296 | 296 | |
297 | -$lockfile = DOL_DATA_ROOT . '/install.lock'; // To lock all /install pages |
|
298 | -$lockfile2 = DOL_DOCUMENT_ROOT . '/install.lock'; // To lock all /install pages (recommended) |
|
299 | -$upgradeunlockfile = DOL_DATA_ROOT . '/upgrade.unlock'; // To unlock upgrade process |
|
300 | -$upgradeunlockfile2 = DOL_DOCUMENT_ROOT . '/upgrade.unlock'; // To unlock upgrade process |
|
297 | +$lockfile = DOL_DATA_ROOT . '/install.lock'; // To lock all /install pages |
|
298 | +$lockfile2 = DOL_DOCUMENT_ROOT . '/install.lock'; // To lock all /install pages (recommended) |
|
299 | +$upgradeunlockfile = DOL_DATA_ROOT . '/upgrade.unlock'; // To unlock upgrade process |
|
300 | +$upgradeunlockfile2 = DOL_DOCUMENT_ROOT . '/upgrade.unlock'; // To unlock upgrade process |
|
301 | 301 | if (constant('DOL_DATA_ROOT') === null) { |
302 | 302 | // We don't have a configuration file yet |
303 | 303 | // Try to detect any lockfile in the default documents path |