@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | $action = GETPOST('action', 'alpha'); |
| 47 | 47 | $value = GETPOST('value', 'alpha'); |
| 48 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 48 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 49 | 49 | |
| 50 | 50 | $label = GETPOST('label', 'alpha'); |
| 51 | 51 | $scandir = GETPOST('scan_dir', 'alpha'); |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | print(empty($module->name) ? $name : $module->name); |
| 410 | 410 | print "</td><td>\n"; |
| 411 | 411 | if (method_exists($module, 'info')) { |
| 412 | - print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 412 | + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 413 | 413 | } else { |
| 414 | 414 | print $module->description; |
| 415 | 415 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $permissionnote = $user->hasRight('contrat', 'creer'); // Used by the include of actions_setnotes.inc.php |
| 111 | 111 | $permissiondellink = $user->hasRight('contrat', 'creer'); // Used by the include of actions_dellink.inc.php |
| 112 | 112 | $permissiontodelete = ($user->hasRight('contrat', 'creer') && $object->statut == $object::STATUS_DRAFT) || $user->hasRight('contrat', 'supprimer'); |
| 113 | -$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 113 | +$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 114 | 114 | $permissiontoedit = $permissiontoadd; |
| 115 | 115 | $permissiontoactivate = $user->hasRight('contrat', 'activer'); |
| 116 | 116 | $error = 0; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | |
| 156 | 156 | include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
| 157 | 157 | |
| 158 | - include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
| 158 | + include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
| 159 | 159 | |
| 160 | 160 | if ($action == 'confirm_active' && $confirm == 'yes' && $permissiontoactivate) { |
| 161 | 161 | $date_start = ''; |
@@ -533,8 +533,8 @@ discard block |
||
| 533 | 533 | $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); |
| 534 | 534 | if ($result) { |
| 535 | 535 | if (count($prodcustprice->lines) > 0) { |
| 536 | - $price_min = price($prodcustprice->lines[0]->price_min); |
|
| 537 | - $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
| 536 | + $price_min = price($prodcustprice->lines[0]->price_min); |
|
| 537 | + $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
| 538 | 538 | /*$tva_tx = $prodcustprice->lines[0]->tva_tx; |
| 539 | 539 | if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { |
| 540 | 540 | $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; |
@@ -767,7 +767,7 @@ discard block |
||
| 767 | 767 | // update price_ht with discount |
| 768 | 768 | // TODO Use object->updateline instead objectline->update |
| 769 | 769 | |
| 770 | - $price_ht = price2num(GETPOST('elprice'), 'MU'); |
|
| 770 | + $price_ht = price2num(GETPOST('elprice'), 'MU'); |
|
| 771 | 771 | $remise_percent = price2num(GETPOST('elremise_percent'), '', 2); |
| 772 | 772 | if ($remise_percent > 0) { |
| 773 | 773 | $remise = round(((float) $price_ht * (float) $remise_percent / 100), 2); |
@@ -874,7 +874,7 @@ discard block |
||
| 874 | 874 | } elseif ($action == 'confirm_activate' && $confirm == 'yes' && $user->hasRight('contrat', 'creer')) { |
| 875 | 875 | $date_start = dol_mktime(12, 0, 0, GETPOST('d_startmonth'), GETPOST('d_startday'), GETPOST('d_startyear')); |
| 876 | 876 | $date_end = dol_mktime(12, 0, 0, GETPOST('d_endmonth'), GETPOST('d_endday'), GETPOST('d_endyear')); |
| 877 | - $comment = GETPOST('comment', 'alpha'); |
|
| 877 | + $comment = GETPOST('comment', 'alpha'); |
|
| 878 | 878 | $result = $object->activateAll($user, $date_start, 0, $comment, $date_end); |
| 879 | 879 | if ($result < 0) { |
| 880 | 880 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -1408,7 +1408,7 @@ discard block |
||
| 1408 | 1408 | $morehtmlref .= '<div class="refidno">'; |
| 1409 | 1409 | // Ref customer |
| 1410 | 1410 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('contrat', 'creer'), 'string', '', 0, 1); |
| 1411 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('contrat', 'creer'), 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1, 'getFormatedCustomerRef'); |
|
| 1411 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('contrat', 'creer'), 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1, 'getFormatedCustomerRef'); |
|
| 1412 | 1412 | // Ref supplier |
| 1413 | 1413 | $morehtmlref .= '<br>'; |
| 1414 | 1414 | $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->hasRight('contrat', 'creer'), 'string', '', 0, 1); |
@@ -1502,7 +1502,7 @@ discard block |
||
| 1502 | 1502 | } |
| 1503 | 1503 | |
| 1504 | 1504 | |
| 1505 | - $arrayothercontracts = $object->getListOfContracts('others'); // array or -1 if technical error |
|
| 1505 | + $arrayothercontracts = $object->getListOfContracts('others'); // array or -1 if technical error |
|
| 1506 | 1506 | |
| 1507 | 1507 | /* |
| 1508 | 1508 | * Lines of contracts |
@@ -1754,7 +1754,7 @@ discard block |
||
| 1754 | 1754 | print $objp->label ? ' - '.dol_trunc($objp->label, 32) : ''; |
| 1755 | 1755 | print '<input type="hidden" name="idprod" value="'.$currentLineProductId.'">'; |
| 1756 | 1756 | } else { |
| 1757 | - $senderissupplier = 0; // @TODO Option to allow purchased products ? |
|
| 1757 | + $senderissupplier = 0; // @TODO Option to allow purchased products ? |
|
| 1758 | 1758 | if (empty($senderissupplier)) { |
| 1759 | 1759 | print $form->select_produits($currentLineProductId, 'idprod', '', 0, 0, 1, 2, '', 0, array(), 0, 1, 0, 'minwidth250onall maxwidth500 widthcentpercentminusx'); |
| 1760 | 1760 | } else { |
@@ -214,12 +214,12 @@ discard block |
||
| 214 | 214 | */ |
| 215 | 215 | public $total; |
| 216 | 216 | |
| 217 | - public $cond_reglement_code; // code |
|
| 218 | - public $cond_reglement; // label |
|
| 219 | - public $cond_reglement_doc; // label doc |
|
| 217 | + public $cond_reglement_code; // code |
|
| 218 | + public $cond_reglement; // label |
|
| 219 | + public $cond_reglement_doc; // label doc |
|
| 220 | 220 | |
| 221 | - public $mode_reglement_code; // code |
|
| 222 | - public $mode_reglement; // label |
|
| 221 | + public $mode_reglement_code; // code |
|
| 222 | + public $mode_reglement; // label |
|
| 223 | 223 | |
| 224 | 224 | public $deposit_percent; |
| 225 | 225 | |
@@ -1437,7 +1437,7 @@ discard block |
||
| 1437 | 1437 | if ($objsoc->id > 0 && !empty($object->lines)) { |
| 1438 | 1438 | if ($update_prices === true && getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { |
| 1439 | 1439 | // If price per customer |
| 1440 | - require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; |
|
| 1440 | + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; |
|
| 1441 | 1441 | } |
| 1442 | 1442 | |
| 1443 | 1443 | foreach ($object->lines as $line) { |
@@ -1631,7 +1631,7 @@ discard block |
||
| 1631 | 1631 | $this->ref_customer = $obj->ref_client; |
| 1632 | 1632 | $this->ref_ext = $obj->ref_ext; |
| 1633 | 1633 | |
| 1634 | - $this->total = $obj->total_ttc; // TODO deprecated |
|
| 1634 | + $this->total = $obj->total_ttc; // TODO deprecated |
|
| 1635 | 1635 | $this->total_ttc = $obj->total_ttc; |
| 1636 | 1636 | $this->total_ht = $obj->total_ht; |
| 1637 | 1637 | $this->total_tva = $obj->total_tva; |
@@ -2546,7 +2546,7 @@ discard block |
||
| 2546 | 2546 | */ |
| 2547 | 2547 | public function closeProposal($user, $status, $note_private = '', $notrigger = 0, $note_public = '') |
| 2548 | 2548 | { |
| 2549 | - global $langs,$conf; |
|
| 2549 | + global $langs, $conf; |
|
| 2550 | 2550 | |
| 2551 | 2551 | $error = 0; |
| 2552 | 2552 | $now = dol_now(); |
@@ -2581,10 +2581,10 @@ discard block |
||
| 2581 | 2581 | if ($resql) { |
| 2582 | 2582 | // Status self::STATUS_REFUSED by default |
| 2583 | 2583 | $modelpdf = getDolGlobalString('PROPALE_ADDON_PDF_ODT_CLOSED', $this->model_pdf); |
| 2584 | - $trigger_name = 'PROPAL_CLOSE_REFUSED'; // used later in call_trigger() |
|
| 2584 | + $trigger_name = 'PROPAL_CLOSE_REFUSED'; // used later in call_trigger() |
|
| 2585 | 2585 | |
| 2586 | 2586 | if ($status == self::STATUS_SIGNED) { // Status self::STATUS_SIGNED |
| 2587 | - $trigger_name = 'PROPAL_CLOSE_SIGNED'; // used later in call_trigger() |
|
| 2587 | + $trigger_name = 'PROPAL_CLOSE_SIGNED'; // used later in call_trigger() |
|
| 2588 | 2588 | $modelpdf = getDolGlobalString('PROPALE_ADDON_PDF_ODT_TOBILL') ? $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL : $this->model_pdf; |
| 2589 | 2589 | |
| 2590 | 2590 | // The connected company is classified as a client |
@@ -2751,10 +2751,10 @@ discard block |
||
| 2751 | 2751 | |
| 2752 | 2752 | $this->db->begin(); |
| 2753 | 2753 | |
| 2754 | - $sql = "UPDATE ". MAIN_DB_PREFIX . "propal"; |
|
| 2755 | - $sql .= " SET fk_statut = " . self::STATUS_CANCELED . ","; |
|
| 2756 | - $sql .= " fk_user_modif = " . ((int) $user->id); |
|
| 2757 | - $sql .= " WHERE rowid = " . ((int) $this->id); |
|
| 2754 | + $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; |
|
| 2755 | + $sql .= " SET fk_statut = ".self::STATUS_CANCELED.","; |
|
| 2756 | + $sql .= " fk_user_modif = ".((int) $user->id); |
|
| 2757 | + $sql .= " WHERE rowid = ".((int) $this->id); |
|
| 2758 | 2758 | |
| 2759 | 2759 | dol_syslog(get_class($this)."::cancel", LOG_DEBUG); |
| 2760 | 2760 | if ($this->db->query($sql)) { |
@@ -3117,7 +3117,7 @@ discard block |
||
| 3117 | 3117 | } |
| 3118 | 3118 | } |
| 3119 | 3119 | if (file_exists($dir)) { |
| 3120 | - $res = @dol_delete_dir_recursive($dir); // delete files physically + into ecm tables |
|
| 3120 | + $res = @dol_delete_dir_recursive($dir); // delete files physically + into ecm tables |
|
| 3121 | 3121 | if (!$res) { |
| 3122 | 3122 | $this->error = 'ErrorFailToDeleteDir'; |
| 3123 | 3123 | $this->errors[] = $this->error; |
@@ -3850,7 +3850,7 @@ discard block |
||
| 3850 | 3850 | } |
| 3851 | 3851 | |
| 3852 | 3852 | global $action; |
| 3853 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
| 3853 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
| 3854 | 3854 | $parameters = array('id' => $this->id, 'getnomurl' => &$result); |
| 3855 | 3855 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
| 3856 | 3856 | if ($reshook > 0) { |
@@ -4433,7 +4433,7 @@ discard block |
||
| 4433 | 4433 | // End call triggers |
| 4434 | 4434 | |
| 4435 | 4435 | if (!$error) { |
| 4436 | - $sql = "DELETE FROM " . MAIN_DB_PREFIX . "propaldet WHERE rowid = " . ((int) $this->rowid); |
|
| 4436 | + $sql = "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE rowid = ".((int) $this->rowid); |
|
| 4437 | 4437 | dol_syslog("PropaleLigne::delete", LOG_DEBUG); |
| 4438 | 4438 | if ($this->db->query($sql)) { |
| 4439 | 4439 | // Remove extrafields |
@@ -4442,11 +4442,11 @@ discard block |
||
| 4442 | 4442 | $result = $this->deleteExtraFields(); |
| 4443 | 4443 | if ($result < 0) { |
| 4444 | 4444 | $error++; |
| 4445 | - dol_syslog(get_class($this) . "::delete error -4 " . $this->error, LOG_ERR); |
|
| 4445 | + dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); |
|
| 4446 | 4446 | } |
| 4447 | 4447 | } |
| 4448 | 4448 | } else { |
| 4449 | - $this->error = $this->db->error() . " sql=" . $sql; |
|
| 4449 | + $this->error = $this->db->error()." sql=".$sql; |
|
| 4450 | 4450 | $error++; |
| 4451 | 4451 | } |
| 4452 | 4452 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | // Parameters |
| 71 | 71 | $action = GETPOST('action', 'aZ09'); |
| 72 | 72 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 73 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 73 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 74 | 74 | |
| 75 | 75 | $value = GETPOST('value', 'alpha'); |
| 76 | 76 | $label = GETPOST('label', 'alpha'); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | // Setup conf for selection of an URL |
| 106 | 106 | $item = $formSetup->newItem('MYMODULE_MYPARAM1'); |
| 107 | -$item->fieldOverride = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST']; |
|
| 107 | +$item->fieldOverride = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://').$_SERVER['HTTP_HOST']; |
|
| 108 | 108 | $item->cssClass = 'minwidth500'; |
| 109 | 109 | |
| 110 | 110 | // Setup conf for selection of a simple string input |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | print(empty($module->name) ? $name : $module->name); |
| 528 | 528 | print "</td><td>\n"; |
| 529 | 529 | if (method_exists($module, 'info')) { |
| 530 | - print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 530 | + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 531 | 531 | } else { |
| 532 | 532 | print $module->description; |
| 533 | 533 | } |
@@ -797,7 +797,7 @@ |
||
| 797 | 797 | // Pagefoot |
| 798 | 798 | $this->_pagefoot($pdf, $object, $outputlangs); |
| 799 | 799 | if (method_exists($pdf, 'AliasNbPages')) { |
| 800 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 800 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 801 | 801 | } |
| 802 | 802 | |
| 803 | 803 | $pdf->Close(); |
@@ -158,11 +158,11 @@ discard block |
||
| 158 | 158 | /** |
| 159 | 159 | * @var int Thirdparty ID |
| 160 | 160 | */ |
| 161 | - public $socid; // both socid and fk_soc are used |
|
| 161 | + public $socid; // both socid and fk_soc are used |
|
| 162 | 162 | /** |
| 163 | 163 | * @var int Thirdparty ID |
| 164 | 164 | */ |
| 165 | - public $fk_soc; // both socid and fk_soc are used |
|
| 165 | + public $fk_soc; // both socid and fk_soc are used |
|
| 166 | 166 | |
| 167 | 167 | /** |
| 168 | 168 | * @var int Status |
@@ -1045,7 +1045,7 @@ discard block |
||
| 1045 | 1045 | $this->date_creation = $this->db->jdate($obj->datec); |
| 1046 | 1046 | $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); |
| 1047 | 1047 | if (!empty($obj->datev)) { |
| 1048 | - $this->date_validation = empty($obj->datev) ? '' : $this->db->jdate($obj->datev); |
|
| 1048 | + $this->date_validation = empty($obj->datev) ? '' : $this->db->jdate($obj->datev); |
|
| 1049 | 1049 | } |
| 1050 | 1050 | } |
| 1051 | 1051 | |
@@ -1251,13 +1251,13 @@ discard block |
||
| 1251 | 1251 | * To overload |
| 1252 | 1252 | * @see CommonObjectLine |
| 1253 | 1253 | */ |
| 1254 | - public $parent_element = ''; // Example: '' or 'myobject' |
|
| 1254 | + public $parent_element = ''; // Example: '' or 'myobject' |
|
| 1255 | 1255 | |
| 1256 | 1256 | /** |
| 1257 | 1257 | * To overload |
| 1258 | 1258 | * @see CommonObjectLine |
| 1259 | 1259 | */ |
| 1260 | - public $fk_parent_attribute = ''; // Example: '' or 'fk_myobject' |
|
| 1260 | + public $fk_parent_attribute = ''; // Example: '' or 'fk_myobject' |
|
| 1261 | 1261 | |
| 1262 | 1262 | /** |
| 1263 | 1263 | * Constructor |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | */ |
| 76 | 76 | public function __construct($name = '') |
| 77 | 77 | { |
| 78 | - parent::__construct($name); // @phan-suppress-current-line PhanUndeclaredClass |
|
| 78 | + parent::__construct($name); // @phan-suppress-current-line PhanUndeclaredClass |
|
| 79 | 79 | |
| 80 | 80 | //$this->sharedFixture |
| 81 | 81 | global $conf, $user, $langs, $db; |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $family = GETPOST('family', 'alpha'); |
| 84 | 84 | $picto = GETPOST('idpicto', 'alpha'); |
| 85 | 85 | $idmodule = GETPOST('idmodule', 'alpha'); |
| 86 | -$format = ''; // Prevent undefined in css tab |
|
| 86 | +$format = ''; // Prevent undefined in css tab |
|
| 87 | 87 | |
| 88 | 88 | // Security check |
| 89 | 89 | if (!isModEnabled('modulebuilder')) { |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | // Copy last 'html.formsetup.class.php' to backport folder |
| 273 | 273 | if (getDolGlobalInt('MODULEBUILDER_SUPPORT_COMPATIBILITY_V16')) { |
| 274 | 274 | $tryToCopyFromSetupClass = true; |
| 275 | - $backportDest = $destdir .'/backport/v16/core/class'; |
|
| 275 | + $backportDest = $destdir.'/backport/v16/core/class'; |
|
| 276 | 276 | $backportFileSrc = DOL_DOCUMENT_ROOT.'/core/class/html.formsetup.class.php'; |
| 277 | 277 | $backportFileDest = $backportDest.'/html.formsetup.class.php'; |
| 278 | 278 | $result = dol_mkdir($backportDest); |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | ); |
| 381 | 381 | |
| 382 | 382 | if (getDolGlobalString('MODULEBUILDER_SPECIFIC_AUTHOR')) { |
| 383 | - $arrayreplacement['---Replace with your own copyright and developer email---'] = dol_print_date($now, '%Y')."\t\t" . getDolGlobalString('MODULEBUILDER_SPECIFIC_AUTHOR'); |
|
| 383 | + $arrayreplacement['---Replace with your own copyright and developer email---'] = dol_print_date($now, '%Y')."\t\t".getDolGlobalString('MODULEBUILDER_SPECIFIC_AUTHOR'); |
|
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | // @phan-suppress-next-line PhanPluginSuspiciousParamPosition |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | |
| 410 | 410 | clearstatcache(true); |
| 411 | 411 | if (function_exists('opcache_invalidate')) { |
| 412 | - opcache_reset(); // remove the include cache hell ! |
|
| 412 | + opcache_reset(); // remove the include cache hell ! |
|
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | header("Location: ".$_SERVER["PHP_SELF"].'?module='.$modulename); |
@@ -417,9 +417,9 @@ discard block |
||
| 417 | 417 | } |
| 418 | 418 | } |
| 419 | 419 | |
| 420 | -$destdir = '/not_set/'; // Initialize (for static analysis) |
|
| 421 | -$destfile = '/not_set/'; // Initialize (for static analysis) |
|
| 422 | -$srcfile = '/not_set/'; // Initialize (for static analysis) |
|
| 420 | +$destdir = '/not_set/'; // Initialize (for static analysis) |
|
| 421 | +$destfile = '/not_set/'; // Initialize (for static analysis) |
|
| 422 | +$srcfile = '/not_set/'; // Initialize (for static analysis) |
|
| 423 | 423 | |
| 424 | 424 | // init API, PHPUnit |
| 425 | 425 | if ($dirins && in_array($action, array('initapi', 'initphpunit', 'initpagecontact', 'initpagedocument', 'initpagenote', 'initpageagenda')) && !empty($module)) { |
@@ -910,7 +910,7 @@ discard block |
||
| 910 | 910 | } |
| 911 | 911 | $stringLog = implode("\n", $strreplace); |
| 912 | 912 | // @phan-suppress-next-line PhanPluginSuspiciousParamPosition |
| 913 | - dolReplaceInFile($destfile, array('//include::ChangeLog.md[]' => '','__CHANGELOG__' => $stringLog)); |
|
| 913 | + dolReplaceInFile($destfile, array('//include::ChangeLog.md[]' => '', '__CHANGELOG__' => $stringLog)); |
|
| 914 | 914 | } |
| 915 | 915 | |
| 916 | 916 | // Delete old documentation files |
@@ -1353,7 +1353,7 @@ discard block |
||
| 1353 | 1353 | } |
| 1354 | 1354 | } |
| 1355 | 1355 | |
| 1356 | - $filetogenerate = array(); // For static analysis |
|
| 1356 | + $filetogenerate = array(); // For static analysis |
|
| 1357 | 1357 | if (!$error) { |
| 1358 | 1358 | // Copy some files |
| 1359 | 1359 | $filetogenerate = array( |
@@ -1589,7 +1589,7 @@ discard block |
||
| 1589 | 1589 | } else { |
| 1590 | 1590 | $menus = array(); |
| 1591 | 1591 | } |
| 1592 | - $counter = 0 ; |
|
| 1592 | + $counter = 0; |
|
| 1593 | 1593 | foreach ($menus as $menu) { |
| 1594 | 1594 | if ($menu['leftmenu'] == strtolower($objectname)) { |
| 1595 | 1595 | $counter++; |
@@ -1631,7 +1631,7 @@ discard block |
||
| 1631 | 1631 | ); |
| 1632 | 1632 | |
| 1633 | 1633 | if (getDolGlobalString('MODULEBUILDER_SPECIFIC_AUTHOR')) { |
| 1634 | - $arrayreplacement['---Replace with your own copyright and developer email---'] = dol_print_date($now, '%Y').' ' . getDolGlobalString('MODULEBUILDER_SPECIFIC_AUTHOR'); |
|
| 1634 | + $arrayreplacement['---Replace with your own copyright and developer email---'] = dol_print_date($now, '%Y').' '.getDolGlobalString('MODULEBUILDER_SPECIFIC_AUTHOR'); |
|
| 1635 | 1635 | } |
| 1636 | 1636 | |
| 1637 | 1637 | $result = dolReplaceInFile($phpfileval['fullname'], $arrayreplacement); |
@@ -1732,7 +1732,7 @@ discard block |
||
| 1732 | 1732 | } else { |
| 1733 | 1733 | createNewDictionnary($module, $moduledescriptorfile, $newdicname, $dictionaries); |
| 1734 | 1734 | if (function_exists('opcache_invalidate')) { |
| 1735 | - opcache_reset(); // remove the include cache hell ! |
|
| 1735 | + opcache_reset(); // remove the include cache hell ! |
|
| 1736 | 1736 | } |
| 1737 | 1737 | clearstatcache(true); |
| 1738 | 1738 | header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=dictionaries&module='.$module.($forceddirread ? '@'.$dirread : '')); |
@@ -1831,7 +1831,7 @@ discard block |
||
| 1831 | 1831 | 'isameasure' => GETPOSTINT('propisameasure'), |
| 1832 | 1832 | 'comment' => GETPOST('propcomment', 'alpha'), |
| 1833 | 1833 | 'help' => GETPOST('prophelp', 'alpha'), |
| 1834 | - 'css' => GETPOST('propcss', 'alpha'), // Can be 'maxwidth500 widthcentpercentminusxx' for example |
|
| 1834 | + 'css' => GETPOST('propcss', 'alpha'), // Can be 'maxwidth500 widthcentpercentminusxx' for example |
|
| 1835 | 1835 | 'cssview' => GETPOST('propcssview', 'alpha'), |
| 1836 | 1836 | 'csslist' => GETPOST('propcsslist', 'alpha'), |
| 1837 | 1837 | 'default' => GETPOST('propdefault', 'restricthtml'), |
@@ -1987,7 +1987,7 @@ discard block |
||
| 1987 | 1987 | |
| 1988 | 1988 | clearstatcache(true); |
| 1989 | 1989 | if (function_exists('opcache_invalidate')) { |
| 1990 | - opcache_reset(); // remove the include cache hell ! |
|
| 1990 | + opcache_reset(); // remove the include cache hell ! |
|
| 1991 | 1991 | } |
| 1992 | 1992 | |
| 1993 | 1993 | header("Location: ".$_SERVER["PHP_SELF"].'?module=deletemodule'); |
@@ -2044,7 +2044,7 @@ discard block |
||
| 2044 | 2044 | $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; |
| 2045 | 2045 | dol_include_once($pathtofile); |
| 2046 | 2046 | $class = 'mod'.$module; |
| 2047 | - $moduleobj = null; |
|
| 2047 | + $moduleobj = null; |
|
| 2048 | 2048 | if (class_exists($class)) { |
| 2049 | 2049 | try { |
| 2050 | 2050 | $moduleobj = new $class($db); |
@@ -2081,7 +2081,7 @@ discard block |
||
| 2081 | 2081 | |
| 2082 | 2082 | clearstatcache(true); |
| 2083 | 2083 | if (function_exists('opcache_invalidate')) { |
| 2084 | - opcache_reset(); // remove the include cache hell ! |
|
| 2084 | + opcache_reset(); // remove the include cache hell ! |
|
| 2085 | 2085 | } |
| 2086 | 2086 | $resultko = 0; |
| 2087 | 2087 | foreach ($filetodelete as $tmpfiletodelete) { |
@@ -2101,7 +2101,7 @@ discard block |
||
| 2101 | 2101 | } |
| 2102 | 2102 | |
| 2103 | 2103 | $action = ''; |
| 2104 | - if (! $error) { |
|
| 2104 | + if (!$error) { |
|
| 2105 | 2105 | $tabobj = 'newobject'; |
| 2106 | 2106 | } else { |
| 2107 | 2107 | $tabobj = 'deleteobject'; |
@@ -2211,7 +2211,7 @@ discard block |
||
| 2211 | 2211 | setEventMessages($langs->trans("DictionaryDeleted", ucfirst(substr($newdicname, 2))), null); |
| 2212 | 2212 | } |
| 2213 | 2213 | if (function_exists('opcache_invalidate')) { |
| 2214 | - opcache_reset(); // remove the include cache hell ! |
|
| 2214 | + opcache_reset(); // remove the include cache hell ! |
|
| 2215 | 2215 | } |
| 2216 | 2216 | clearstatcache(true); |
| 2217 | 2217 | header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=dictionaries&module='.$module.($forceddirread ? '@'.$dirread : '')); |
@@ -2219,7 +2219,7 @@ discard block |
||
| 2219 | 2219 | } |
| 2220 | 2220 | } |
| 2221 | 2221 | if ($dirins && $action == 'updatedictionary' && GETPOST('dictionnarykey')) { |
| 2222 | - $keydict = GETPOSTINT('dictionnarykey') - 1 ; |
|
| 2222 | + $keydict = GETPOSTINT('dictionnarykey') - 1; |
|
| 2223 | 2223 | |
| 2224 | 2224 | $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; |
| 2225 | 2225 | $destdir = $dirins.'/'.strtolower($module); |
@@ -2254,7 +2254,7 @@ discard block |
||
| 2254 | 2254 | setEventMessages($langs->trans("DictionaryNameUpdated", ucfirst(GETPOST('tablib'))), null); |
| 2255 | 2255 | } |
| 2256 | 2256 | if (function_exists('opcache_invalidate')) { |
| 2257 | - opcache_reset(); // remove the include cache hell ! |
|
| 2257 | + opcache_reset(); // remove the include cache hell ! |
|
| 2258 | 2258 | } |
| 2259 | 2259 | clearstatcache(true); |
| 2260 | 2260 | header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=dictionaries&module='.$module.($forceddirread ? '@'.$dirread : '')); |
@@ -2437,7 +2437,7 @@ discard block |
||
| 2437 | 2437 | |
| 2438 | 2438 | clearstatcache(true); |
| 2439 | 2439 | if (function_exists('opcache_invalidate')) { |
| 2440 | - opcache_reset(); // remove the include cache hell ! |
|
| 2440 | + opcache_reset(); // remove the include cache hell ! |
|
| 2441 | 2441 | } |
| 2442 | 2442 | header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=permissions&module='.$module); |
| 2443 | 2443 | exit; |
@@ -2551,12 +2551,12 @@ discard block |
||
| 2551 | 2551 | if ($rewrite < 0) { |
| 2552 | 2552 | setEventMessages($langs->trans("WarningCommentNotFound", $langs->trans("Permissions"), "mod".$module."class.php"), null, 'warnings'); |
| 2553 | 2553 | } else { |
| 2554 | - $rightUpdated = null; // I not set at this point |
|
| 2554 | + $rightUpdated = null; // I not set at this point |
|
| 2555 | 2555 | reWriteAllPermissions($moduledescriptorfile, $permissions, $key, $rightUpdated, '', '', 2); |
| 2556 | 2556 | setEventMessages($langs->trans('PermissionUpdatedSuccesfuly'), null); |
| 2557 | 2557 | clearstatcache(true); |
| 2558 | 2558 | if (function_exists('opcache_invalidate')) { |
| 2559 | - opcache_reset(); // remove the include cache hell ! |
|
| 2559 | + opcache_reset(); // remove the include cache hell ! |
|
| 2560 | 2560 | } |
| 2561 | 2561 | header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=permissions&module='.$module); |
| 2562 | 2562 | exit; |
@@ -2608,7 +2608,7 @@ discard block |
||
| 2608 | 2608 | |
| 2609 | 2609 | clearstatcache(true); |
| 2610 | 2610 | if (function_exists('opcache_invalidate')) { |
| 2611 | - opcache_reset(); // remove the include cache hell ! |
|
| 2611 | + opcache_reset(); // remove the include cache hell ! |
|
| 2612 | 2612 | } |
| 2613 | 2613 | |
| 2614 | 2614 | header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=permissions&module='.$module); |
@@ -2780,7 +2780,7 @@ discard block |
||
| 2780 | 2780 | |
| 2781 | 2781 | clearstatcache(true); |
| 2782 | 2782 | if (function_exists('opcache_invalidate')) { |
| 2783 | - opcache_reset(); // remove the include cache hell ! |
|
| 2783 | + opcache_reset(); // remove the include cache hell ! |
|
| 2784 | 2784 | } |
| 2785 | 2785 | |
| 2786 | 2786 | setEventMessages($langs->trans('MenuDeletedSuccessfuly'), null); |
@@ -2839,7 +2839,7 @@ discard block |
||
| 2839 | 2839 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Url")), null, 'errors'); |
| 2840 | 2840 | } |
| 2841 | 2841 | if (!empty(GETPOST('target'))) { |
| 2842 | - $targets = array('_blank','_self','_parent','_top',''); |
|
| 2842 | + $targets = array('_blank', '_self', '_parent', '_top', ''); |
|
| 2843 | 2843 | if (!in_array(GETPOST('target'), $targets)) { |
| 2844 | 2844 | $error++; |
| 2845 | 2845 | setEventMessages($langs->trans("ErrorFieldValue", $langs->transnoentities("target")), null, 'errors'); |
@@ -2945,7 +2945,7 @@ discard block |
||
| 2945 | 2945 | |
| 2946 | 2946 | // Modify a menu entry |
| 2947 | 2947 | if ($dirins && $action == "update_menu" && GETPOSTINT('menukey') && GETPOST('tabobj')) { |
| 2948 | - $objectname = GETPOST('tabobj'); |
|
| 2948 | + $objectname = GETPOST('tabobj'); |
|
| 2949 | 2949 | $dirins = $listofmodules[strtolower($module)]['moduledescriptorrootpath']; |
| 2950 | 2950 | $destdir = $dirins.'/'.strtolower($module); |
| 2951 | 2951 | $objects = dolGetListOfObjectClasses($destdir); |
@@ -3042,7 +3042,7 @@ discard block |
||
| 3042 | 3042 | } |
| 3043 | 3043 | } |
| 3044 | 3044 | } else { |
| 3045 | - $_POST['type'] = ''; // TODO Use a var here and later |
|
| 3045 | + $_POST['type'] = ''; // TODO Use a var here and later |
|
| 3046 | 3046 | $_POST['titre'] = ''; |
| 3047 | 3047 | $_POST['fk_menu'] = ''; |
| 3048 | 3048 | $_POST['leftmenu'] = ''; |
@@ -4116,8 +4116,8 @@ discard block |
||
| 4116 | 4116 | } |
| 4117 | 4117 | print '</table><br>'."\n"; |
| 4118 | 4118 | print '<div class="center">'; |
| 4119 | - print '<input type="submit" class="button button-save" name="add" value="' . dol_escape_htmltag($langs->trans('Create')) . '">'; |
|
| 4120 | - print '<input type="button" class="button button-cancel" name="cancel" value="' . dol_escape_htmltag($langs->trans('Cancel')) . '" onclick="goBack()">'; |
|
| 4119 | + print '<input type="submit" class="button button-save" name="add" value="'.dol_escape_htmltag($langs->trans('Create')).'">'; |
|
| 4120 | + print '<input type="button" class="button button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans('Cancel')).'" onclick="goBack()">'; |
|
| 4121 | 4121 | print '</div>'; |
| 4122 | 4122 | print '</form>'; |
| 4123 | 4123 | // javascript |
@@ -4222,16 +4222,16 @@ discard block |
||
| 4222 | 4222 | // Define path for sql file |
| 4223 | 4223 | $pathtosql = strtolower($module).'/sql/llx_'.strtolower($module).'_'.strtolower($tabobj).'-'.strtolower($module).'.sql'; |
| 4224 | 4224 | $result = dol_buildpath($pathtosql); |
| 4225 | - if (! dol_is_file($result)) { |
|
| 4225 | + if (!dol_is_file($result)) { |
|
| 4226 | 4226 | $pathtosql = strtolower($module).'/sql/llx_'.strtolower($module).'_'.strtolower($tabobj).'.sql'; |
| 4227 | 4227 | $result = dol_buildpath($pathtosql); |
| 4228 | - if (! dol_is_file($result)) { |
|
| 4228 | + if (!dol_is_file($result)) { |
|
| 4229 | 4229 | $pathtosql = 'install/mysql/tables/llx_'.strtolower($module).'_'.strtolower($tabobj).'-'.strtolower($module).'.sql'; |
| 4230 | 4230 | $result = dol_buildpath($pathtosql); |
| 4231 | - if (! dol_is_file($result)) { |
|
| 4231 | + if (!dol_is_file($result)) { |
|
| 4232 | 4232 | $pathtosql = 'install/mysql/tables/llx_'.strtolower($module).'-'.strtolower($module).'.sql'; |
| 4233 | 4233 | $result = dol_buildpath($pathtosql); |
| 4234 | - if (! dol_is_file($result)) { |
|
| 4234 | + if (!dol_is_file($result)) { |
|
| 4235 | 4235 | $pathtosql = 'install/mysql/tables/llx_'.strtolower($module).'.sql'; |
| 4236 | 4236 | $pathtosqlextra = 'install/mysql/tables/llx_'.strtolower($module).'_extrafields.sql'; |
| 4237 | 4237 | $result = dol_buildpath($pathtosql); |
@@ -4250,12 +4250,12 @@ discard block |
||
| 4250 | 4250 | $pathtosqlroot = preg_replace('/\/llx_.*$/', '', $pathtosql); |
| 4251 | 4251 | |
| 4252 | 4252 | $pathtosqlkey = preg_replace('/\.sql$/', '.key.sql', $pathtosql); |
| 4253 | - $pathtosqlextrakey = preg_replace('/\.sql$/', '.key.sql', $pathtosqlextra); |
|
| 4253 | + $pathtosqlextrakey = preg_replace('/\.sql$/', '.key.sql', $pathtosqlextra); |
|
| 4254 | 4254 | |
| 4255 | 4255 | $pathtolib = strtolower($module).'/lib/'.strtolower($module).'.lib.php'; |
| 4256 | 4256 | $pathtoobjlib = strtolower($module).'/lib/'.strtolower($module).'_'.strtolower($tabobj).'.lib.php'; |
| 4257 | 4257 | |
| 4258 | - $tmpobject = $tmpobject ?? null; // @phan-suppress-current-line PhanPluginDuplicateExpressionAssignmentOperation |
|
| 4258 | + $tmpobject = $tmpobject ?? null; // @phan-suppress-current-line PhanPluginDuplicateExpressionAssignmentOperation |
|
| 4259 | 4259 | if (is_object($tmpobject) && property_exists($tmpobject, 'picto')) { |
| 4260 | 4260 | $pathtopicto = $tmpobject->picto; |
| 4261 | 4261 | $realpathtopicto = ''; |
@@ -5538,7 +5538,7 @@ discard block |
||
| 5538 | 5538 | } |
| 5539 | 5539 | }); |
| 5540 | 5540 | |
| 5541 | - var groupedRights = ' . $groupedRights_json . '; |
|
| 5541 | + var groupedRights = ' . $groupedRights_json.'; |
|
| 5542 | 5542 | var objectsSelect = $("select[id=\'objects\']"); |
| 5543 | 5543 | var permsSelect = $("select[id=\'perms\']"); |
| 5544 | 5544 | |
@@ -5762,7 +5762,7 @@ discard block |
||
| 5762 | 5762 | if (in_array($perm[5], array('lire', 'read', 'creer', 'write', 'effacer', 'delete'))) { |
| 5763 | 5763 | print dol_escape_htmltag(ucfirst($perm[4])); |
| 5764 | 5764 | } else { |
| 5765 | - print ''; // No particular object |
|
| 5765 | + print ''; // No particular object |
|
| 5766 | 5766 | } |
| 5767 | 5767 | print '</td>'; |
| 5768 | 5768 | |
@@ -6664,9 +6664,9 @@ discard block |
||
| 6664 | 6664 | |
| 6665 | 6665 | print '<td>'; |
| 6666 | 6666 | if ($tabName[0] === "+") { |
| 6667 | - print '<span class="badge badge-status4 badge-status">' . dol_escape_htmltag($tabName) . '</span>'; |
|
| 6667 | + print '<span class="badge badge-status4 badge-status">'.dol_escape_htmltag($tabName).'</span>'; |
|
| 6668 | 6668 | } else { |
| 6669 | - print '<span class="badge badge-status8 badge-status">' . dol_escape_htmltag($tabName) . '</span>'; |
|
| 6669 | + print '<span class="badge badge-status8 badge-status">'.dol_escape_htmltag($tabName).'</span>'; |
|
| 6670 | 6670 | } |
| 6671 | 6671 | print '</td>'; |
| 6672 | 6672 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | $object = new IntracommReport($db); |
| 105 | 105 | $extrafields = new ExtraFields($db); |
| 106 | 106 | $diroutputmassaction = $conf->mymodule->dir_output.'/temp/massgeneration/'.$user->id; |
| 107 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
| 107 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
| 108 | 108 | |
| 109 | 109 | // Fetch optionals attributes and labels |
| 110 | 110 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | // Default sort order (if not yet defined by previous GETPOST) |
| 116 | 116 | if (!$sortfield) { |
| 117 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 117 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 118 | 118 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
| 119 | 119 | } |
| 120 | 120 | if (!$sortorder) { |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | // Output page |
| 429 | 429 | // -------------------------------------------------------------------- |
| 430 | 430 | |
| 431 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-mymodule page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 431 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-mymodule page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 432 | 432 | |
| 433 | 433 | // Example : Adding jquery code |
| 434 | 434 | // print '<script type="text/javascript"> |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | } |
| 564 | 564 | |
| 565 | 565 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 566 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup |
|
| 566 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup |
|
| 567 | 567 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 568 | 568 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 569 | 569 | |
@@ -656,7 +656,7 @@ discard block |
||
| 656 | 656 | } 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'])) { |
| 657 | 657 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
| 658 | 658 | } |
| 659 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 659 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 660 | 660 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
| 661 | 661 | 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"; |
| 662 | 662 | $totalarray['nbfield']++; |