@@ -376,9 +376,9 @@ discard block |
||
| 376 | 376 | $vartmp = (empty($InfoFieldList[3]) ? '' : $InfoFieldList[3]); |
| 377 | 377 | $reg = array(); |
| 378 | 378 | if (preg_match('/^.*:(\w*)$/', $vartmp, $reg)) { |
| 379 | - $InfoFieldList[4] = $reg[1]; // take the sort field |
|
| 379 | + $InfoFieldList[4] = $reg[1]; // take the sort field |
|
| 380 | 380 | } |
| 381 | - $InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp); // take the filter field |
|
| 381 | + $InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp); // take the filter field |
|
| 382 | 382 | |
| 383 | 383 | $classname = $InfoFieldList[0]; |
| 384 | 384 | $classpath = $InfoFieldList[1]; |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | if (!empty($objecttmp->fields)) { // For object that declare it, it is better to use declared fields (like societe, contact, ...) |
| 450 | 450 | $tmpfieldstoshow = ''; |
| 451 | 451 | foreach ($objecttmp->fields as $key => $val) { |
| 452 | - if (! (int) dol_eval($val['enabled'], 1, 1, '1')) { |
|
| 452 | + if (!(int) dol_eval($val['enabled'], 1, 1, '1')) { |
|
| 453 | 453 | continue; |
| 454 | 454 | } |
| 455 | 455 | if (!empty($val['showoncombobox'])) { |
@@ -1056,7 +1056,7 @@ discard block |
||
| 1056 | 1056 | // |
| 1057 | 1057 | } elseif ($type == 'date') { |
| 1058 | 1058 | if (!empty($value)) { |
| 1059 | - $value = dol_print_date($value, 'day'); // We suppose dates without time are always gmt (storage of course + output) |
|
| 1059 | + $value = dol_print_date($value, 'day'); // We suppose dates without time are always gmt (storage of course + output) |
|
| 1060 | 1060 | } else { |
| 1061 | 1061 | $value = ''; |
| 1062 | 1062 | } |
@@ -171,8 +171,8 @@ |
||
| 171 | 171 | $confirm = GETPOST('confirm', 'alpha'); |
| 172 | 172 | $cancel = GETPOST('cancel', 'aZ09'); |
| 173 | 173 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'webportal' . $elementEn . 'card'; // To manage different context of search |
| 174 | - $backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 175 | - $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
| 174 | + $backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 175 | + $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
| 176 | 176 | $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
| 177 | 177 | |
| 178 | 178 | // Initialize technical objects |
@@ -170,7 +170,7 @@ |
||
| 170 | 170 | $this->tplPath = realpath(__DIR__ . '/../../public/webportal/tpl'); |
| 171 | 171 | |
| 172 | 172 | $this->controller = GETPOST('controller', 'aZ09'); // for security, limited to 'aZ09' |
| 173 | - $this->action = GETPOST('action', 'aZ09');// for security, limited to 'aZ09' |
|
| 173 | + $this->action = GETPOST('action', 'aZ09'); // for security, limited to 'aZ09' |
|
| 174 | 174 | |
| 175 | 175 | if (empty($this->controller)) { |
| 176 | 176 | $this->controller = 'default'; |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | /* Use $context singleton to modify menu, */ |
| 155 | 155 | $parameters['controller'] = $context->controller; |
| 156 | 156 | |
| 157 | - $reshook = $hookmanager->executeHooks('doActions', $parameters, $context, $context->action); // Note that $action and $object may have been modified by hook |
|
| 157 | + $reshook = $hookmanager->executeHooks('doActions', $parameters, $context, $context->action); // Note that $action and $object may have been modified by hook |
|
| 158 | 158 | if ($reshook < 0) { |
| 159 | 159 | $context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 160 | 160 | } |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | /* Use $context singleton to modify menu, */ |
| 178 | 178 | $parameters['controller'] = $context->controller; |
| 179 | 179 | |
| 180 | - $reshook = $hookmanager->executeHooks('PrintPageView', $parameters, $context, $context->action); // Note that $action and $object may have been modified by hook |
|
| 180 | + $reshook = $hookmanager->executeHooks('PrintPageView', $parameters, $context, $context->action); // Note that $action and $object may have been modified by hook |
|
| 181 | 181 | if ($reshook < 0) { |
| 182 | 182 | $context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 183 | 183 | } |
@@ -35,8 +35,8 @@ |
||
| 35 | 35 | public $primaryColorHex = '#263c5c'; |
| 36 | 36 | public $primaryColorHsl = array( |
| 37 | 37 | 'h' => 216, // Hue |
| 38 | - 'l' => 42, // lightness |
|
| 39 | - 's' => 25, // Saturation |
|
| 38 | + 'l' => 42, // lightness |
|
| 39 | + 's' => 25, // Saturation |
|
| 40 | 40 | 'a' => 1 // Alfa |
| 41 | 41 | ); |
| 42 | 42 | |
@@ -1126,7 +1126,7 @@ discard block |
||
| 1126 | 1126 | $stringtoexport = str_replace('medias/image/' . $website->ref . '/', "medias/image/__WEBSITE_KEY__/", $stringtoexport); |
| 1127 | 1127 | $stringtoexport = str_replace('medias/js/' . $website->ref . '/', "medias/js/__WEBSITE_KEY__/", $stringtoexport); |
| 1128 | 1128 | $stringtoexport = str_replace('"image/' . $website->ref . '/', '"image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="image/websiteref/file.png" into html content |
| 1129 | - $stringtoexport = str_replace('"/image/' . $website->ref . '/', '"/image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="/image/websiteref/file.png" into html content |
|
| 1129 | + $stringtoexport = str_replace('"/image/' . $website->ref . '/', '"/image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="/image/websiteref/file.png" into html content |
|
| 1130 | 1130 | $stringtoexport = str_replace('"js/' . $website->ref . '/', '"js/__WEBSITE_KEY__/', $stringtoexport); |
| 1131 | 1131 | $stringtoexport = str_replace('"/js/' . $website->ref . '/', '"/js/__WEBSITE_KEY__/', $stringtoexport); |
| 1132 | 1132 | |
@@ -1455,7 +1455,7 @@ discard block |
||
| 1455 | 1455 | $filetpl = $pathofwebsite . '/page' . $object->fk_default_home . '.tpl.php'; |
| 1456 | 1456 | } |
| 1457 | 1457 | $filewrapper = $pathofwebsite . '/wrapper.php'; |
| 1458 | - dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper, $object); // This includes also a version of index.php into sublanguage directories |
|
| 1458 | + dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper, $object); // This includes also a version of index.php into sublanguage directories |
|
| 1459 | 1459 | } |
| 1460 | 1460 | |
| 1461 | 1461 | if ($error) { |
@@ -1901,7 +1901,7 @@ discard block |
||
| 1901 | 1901 | $destContent = file_get_contents($fileNeeded['fullname']); |
| 1902 | 1902 | |
| 1903 | 1903 | $numOfPageDest = $this->extractNumberFromFilename($fileNeeded['name']); |
| 1904 | - $differences = $this->showDifferences($destContent, $sourceContent, array($numOfPageDest,$numOfPageSource)); |
|
| 1904 | + $differences = $this->showDifferences($destContent, $sourceContent, array($numOfPageDest, $numOfPageSource)); |
|
| 1905 | 1905 | $differences['file_destination'] = $fileNeeded; |
| 1906 | 1906 | } else { |
| 1907 | 1907 | $differences = array(); |
@@ -1944,7 +1944,7 @@ discard block |
||
| 1944 | 1944 | $linefound = array(); |
| 1945 | 1945 | $countNumPage = count($exceptNumPge); |
| 1946 | 1946 | |
| 1947 | - for ($i = 0;$i < $countNumPage; $i++) { |
|
| 1947 | + for ($i = 0; $i < $countNumPage; $i++) { |
|
| 1948 | 1948 | $linefound[$i] = array(); |
| 1949 | 1949 | $linefound[$i]['meta'] = '/content="' . preg_quote($exceptNumPge[$i], '/') . '" \/>/'; |
| 1950 | 1950 | $linefound[$i]['output'] = '/dolWebsiteOutput\(\$tmp, "html", ' . preg_quote($exceptNumPge[$i], '/') . '\);/'; |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | /** |
| 65 | 65 | * @var int ID |
| 66 | 66 | */ |
| 67 | - public $fk_website; // If translation of another page |
|
| 67 | + public $fk_website; // If translation of another page |
|
| 68 | 68 | public $fk_page; |
| 69 | 69 | public $pageurl; |
| 70 | 70 | public $aliasalt; |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | /** |
| 123 | 123 | * @var int Another ID that is the $id but with an offset so that ID of pages of the website start at 1 |
| 124 | 124 | */ |
| 125 | - public $newid; // offline |
|
| 125 | + public $newid; // offline |
|
| 126 | 126 | /** |
| 127 | 127 | * @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array<int,string>,comment?:string}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. |
| 128 | 128 | */ |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -1, 'index' => 1, 'position' => 1000, 'notnull' => -1), |
| 154 | 154 | 'object_type' => array('type' => 'varchar(255)', 'label' => 'ObjectType', 'enabled' => 1, 'visible' => 0, 'position' => 46, 'searchall' => 0, 'help' => ''), |
| 155 | 155 | 'fk_object' => array('type' => 'varchar(255)', 'label' => 'ObjectId', 'enabled' => 1, 'visible' => 0, 'position' => 47, 'searchall' => 0, 'help' => '') |
| 156 | - ); // online |
|
| 156 | + ); // online |
|
| 157 | 157 | |
| 158 | 158 | |
| 159 | 159 | /** |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | $sql .= " t.fk_object"; |
| 244 | 244 | $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t'; |
| 245 | 245 | if (!empty($websiteid)) { |
| 246 | - $sql .= ' WHERE t.fk_website = ' . ((int)$websiteid); |
|
| 246 | + $sql .= ' WHERE t.fk_website = ' . ((int) $websiteid); |
|
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 | // Deprecated. If we receive an array, we use it. Prefer using the USF syntax. |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | if (count($filter) > 0) { |
| 254 | 254 | foreach ($filter as $key => $value) { |
| 255 | 255 | if ($key == 't.rowid' || $key == 'rowid' || $key == 't.fk_website' || $key == 'fk_website' || $key == 'status' || $key == 't.status') { |
| 256 | - $sqlwhere[] = $key . " = " . ((int)$value); |
|
| 256 | + $sqlwhere[] = $key . " = " . ((int) $value); |
|
| 257 | 257 | } elseif ($key == 'type_container' || $key == 't.type_container') { |
| 258 | 258 | $sqlwhere[] = $key . " = '" . $this->db->escape($value) . "'"; |
| 259 | 259 | } elseif ($key == 'lang' || $key == 't.lang') { |
@@ -364,14 +364,14 @@ discard block |
||
| 364 | 364 | |
| 365 | 365 | $sql = 'SELECT COUNT(t.rowid) as nb'; |
| 366 | 366 | $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t'; |
| 367 | - $sql .= ' WHERE t.fk_website = ' . ((int)$websiteid); |
|
| 367 | + $sql .= ' WHERE t.fk_website = ' . ((int) $websiteid); |
|
| 368 | 368 | |
| 369 | 369 | // Manage filter (same than into fetchAll) |
| 370 | 370 | $sqlwhere = array(); |
| 371 | 371 | if (count($filter) > 0) { |
| 372 | 372 | foreach ($filter as $key => $value) { |
| 373 | 373 | if ($key == 't.rowid' || $key == 't.fk_website' || $key == 'status') { |
| 374 | - $sqlwhere[] = $key . " = " . ((int)$value); |
|
| 374 | + $sqlwhere[] = $key . " = " . ((int) $value); |
|
| 375 | 375 | } elseif ($key == 'type_container') { |
| 376 | 376 | $sqlwhere[] = $key . " = '" . $this->db->escape($value) . "'"; |
| 377 | 377 | } elseif ($key == 'lang' || $key == 't.lang') { |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | //$sql .= ' WHERE entity IN ('.getEntity('website').')'; // entity is on website level |
| 500 | 500 | $sql .= ' WHERE 1 = 1'; |
| 501 | 501 | if ($id > 0) { |
| 502 | - $sql .= ' AND t.rowid = ' . ((int)$id); |
|
| 502 | + $sql .= ' AND t.rowid = ' . ((int) $id); |
|
| 503 | 503 | } else { |
| 504 | 504 | if ($id < 0) { |
| 505 | 505 | $sql .= ' AND t.rowid <> ' . abs($id); |
@@ -595,7 +595,7 @@ discard block |
||
| 595 | 595 | if (!$error) { |
| 596 | 596 | foreach ($this->childtablesoncascade as $table) { |
| 597 | 597 | $sql = "DELETE FROM " . MAIN_DB_PREFIX . $table; |
| 598 | - $sql .= " WHERE fk_website_page = " . (int)$this->id; |
|
| 598 | + $sql .= " WHERE fk_website_page = " . (int) $this->id; |
|
| 599 | 599 | |
| 600 | 600 | $result = $this->db->query($sql); |
| 601 | 601 | if (!$result) { |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | /** |
| 254 | 254 | * @var string external payment site |
| 255 | 255 | */ |
| 256 | - public $ext_payment_site; // Name of the external payment system ('StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ...) |
|
| 256 | + public $ext_payment_site; // Name of the external payment system ('StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ...) |
|
| 257 | 257 | |
| 258 | 258 | /** |
| 259 | 259 | * @var string comment |
@@ -544,9 +544,9 @@ discard block |
||
| 544 | 544 | $this->rum = $obj->rum; |
| 545 | 545 | $this->frstrecur = $obj->frstrecur; |
| 546 | 546 | $this->date_rum = $this->db->jdate($obj->date_rum); |
| 547 | - $this->stripe_card_ref = $obj->stripe_card_ref; // External system payment mode ID |
|
| 548 | - $this->stripe_account = $obj->stripe_account; // External system customer ID |
|
| 549 | - $this->ext_payment_site = $obj->ext_payment_site; // External system name ('StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ...) |
|
| 547 | + $this->stripe_card_ref = $obj->stripe_card_ref; // External system payment mode ID |
|
| 548 | + $this->stripe_account = $obj->stripe_account; // External system customer ID |
|
| 549 | + $this->ext_payment_site = $obj->ext_payment_site; // External system name ('StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ...) |
|
| 550 | 550 | $this->last_main_doc = $obj->last_main_doc; |
| 551 | 551 | $this->model_pdf = $obj->model_pdf; |
| 552 | 552 | } |
@@ -1057,7 +1057,7 @@ discard block |
||
| 1057 | 1057 | } |
| 1058 | 1058 | |
| 1059 | 1059 | if ($ret >= 0) { |
| 1060 | - if (! $notrigger) { |
|
| 1060 | + if (!$notrigger) { |
|
| 1061 | 1061 | // Call trigger |
| 1062 | 1062 | $result = $this->call_trigger('COMPANY_CREATE', $user); |
| 1063 | 1063 | if ($result < 0) { |
@@ -1986,7 +1986,7 @@ discard block |
||
| 1986 | 1986 | $this->code_client = $obj->code_client; |
| 1987 | 1987 | $this->code_fournisseur = $obj->code_fournisseur; |
| 1988 | 1988 | |
| 1989 | - $this->code_compta = $obj->code_compta; // For backward compatibility |
|
| 1989 | + $this->code_compta = $obj->code_compta; // For backward compatibility |
|
| 1990 | 1990 | $this->code_compta_client = $obj->code_compta; |
| 1991 | 1991 | $this->code_compta_fournisseur = $obj->code_compta_fournisseur; |
| 1992 | 1992 | |
@@ -2566,10 +2566,10 @@ discard block |
||
| 2566 | 2566 | $reparray[$i]['firstname'] = $obj->firstname; |
| 2567 | 2567 | $reparray[$i]['email'] = $obj->email; |
| 2568 | 2568 | $reparray[$i]['phone'] = $obj->office_phone; |
| 2569 | - $reparray[$i]['office_phone'] = $obj->office_phone; // Pro phone |
|
| 2569 | + $reparray[$i]['office_phone'] = $obj->office_phone; // Pro phone |
|
| 2570 | 2570 | $reparray[$i]['office_fax'] = $obj->office_fax; |
| 2571 | - $reparray[$i]['user_mobile'] = $obj->user_mobile; // Pro mobile |
|
| 2572 | - $reparray[$i]['personal_mobile'] = $obj->personal_mobile; // Personal mobile |
|
| 2571 | + $reparray[$i]['user_mobile'] = $obj->user_mobile; // Pro mobile |
|
| 2572 | + $reparray[$i]['personal_mobile'] = $obj->personal_mobile; // Personal mobile |
|
| 2573 | 2573 | $reparray[$i]['job'] = $obj->job; |
| 2574 | 2574 | $reparray[$i]['statut'] = $obj->status; // deprecated |
| 2575 | 2575 | $reparray[$i]['status'] = $obj->status; |
@@ -3735,7 +3735,7 @@ discard block |
||
| 3735 | 3735 | $sql .= ' WHERE rowid = ' . ((int) $idparent); |
| 3736 | 3736 | $resql = $this->db->query($sql); |
| 3737 | 3737 | if ($resql) { |
| 3738 | - $obj = $this->db->fetch_object($resql); |
|
| 3738 | + $obj = $this->db->fetch_object($resql); |
|
| 3739 | 3739 | |
| 3740 | 3740 | if ($obj->parent == '') { |
| 3741 | 3741 | return 0; |
@@ -4371,7 +4371,7 @@ discard block |
||
| 4371 | 4371 | $country_code = $country_label = ''; |
| 4372 | 4372 | if (getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY')) { |
| 4373 | 4373 | $tmp = explode(':', getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY')); |
| 4374 | - $country_id = (is_numeric($tmp[0])) ? (int) $tmp[0] : 0; |
|
| 4374 | + $country_id = (is_numeric($tmp[0])) ? (int) $tmp[0] : 0; |
|
| 4375 | 4375 | if (!empty($tmp[1])) { // If $conf->global->MAIN_INFO_SOCIETE_COUNTRY is "id:code:label" |
| 4376 | 4376 | $country_code = $tmp[1]; |
| 4377 | 4377 | $country_label = $tmp[2]; |
@@ -5343,7 +5343,7 @@ discard block |
||
| 5343 | 5343 | global $conf, $langs, $hookmanager, $user, $action; |
| 5344 | 5344 | |
| 5345 | 5345 | $error = 0; |
| 5346 | - $soc_origin = new Societe($this->db); // The thirdparty that we will delete |
|
| 5346 | + $soc_origin = new Societe($this->db); // The thirdparty that we will delete |
|
| 5347 | 5347 | |
| 5348 | 5348 | dol_syslog("mergeCompany merge thirdparty id=" . $soc_origin_id . " (will be deleted) into the thirdparty id=" . $this->id); |
| 5349 | 5349 | |