@@ -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 |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | // Only works if you are not in safe_mode. / Ne fonctionne que si on est pas en safe_mode. |
43 | 43 | |
44 | 44 | $err = error_reporting(); |
45 | -error_reporting(0); // Disable all errors |
|
45 | +error_reporting(0); // Disable all errors |
|
46 | 46 | //error_reporting(E_ALL); |
47 | -@set_time_limit(1800); // Need 1800 on some very slow OS like Windows 7/64 |
|
47 | +@set_time_limit(1800); // Need 1800 on some very slow OS like Windows 7/64 |
|
48 | 48 | error_reporting($err); |
49 | 49 | |
50 | 50 | $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : (empty($argv[1]) ? '' : $argv[1]); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | dolibarr_install_syslog("--- step2: entering step2.php page"); |
95 | 95 | |
96 | -'@phan-var-force string $dolibarr_main_db_prefix'; // From configuraiotn file or install/inc.php |
|
96 | +'@phan-var-force string $dolibarr_main_db_prefix'; // From configuraiotn file or install/inc.php |
|
97 | 97 | |
98 | 98 | /* |
99 | 99 | * View |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | print '<table cellspacing="0" style="padding: 4px 4px 4px 0" border="0" width="100%">'; |
115 | 115 | $error = 0; |
116 | 116 | |
117 | - $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, (int)$conf->db->port); |
|
117 | + $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, (int) $conf->db->port); |
|
118 | 118 | |
119 | 119 | if ($db->connected) { |
120 | 120 | print "<tr><td>"; |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | |
600 | 600 | $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 |
601 | 601 | |
602 | -$hash_unique_id = dol_hash('dolibarr' . $conf->file->instance_unique_id, 'sha256'); // Note: if the global salt changes, this hash changes too so ping may be counted twice. We don't mind. It is for statistics purpose only. |
|
602 | +$hash_unique_id = dol_hash('dolibarr' . $conf->file->instance_unique_id, 'sha256'); // Note: if the global salt changes, this hash changes too so ping may be counted twice. We don't mind. It is for statistics purpose only. |
|
603 | 603 | |
604 | 604 | $out = '<input type="checkbox" name="dolibarrpingno" id="dolibarrpingno"' . ((getDolGlobalString('MAIN_FIRST_PING_OK_ID') == 'disabled') ? '' : ' value="checked" checked="true"') . '> '; |
605 | 605 | $out .= '<label for="dolibarrpingno">' . $langs->trans("MakeAnonymousPing") . '</label>'; |
@@ -68,7 +68,7 @@ |
||
68 | 68 | // Parameters |
69 | 69 | $action = GETPOST('action', 'aZ09'); |
70 | 70 | $backtopage = GETPOST('backtopage', 'alpha'); |
71 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
71 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
72 | 72 | |
73 | 73 | $value = GETPOST('value', 'alpha'); |
74 | 74 | $label = GETPOST('label', 'alpha'); |