@@ -466,7 +466,7 @@ |
||
| 466 | 466 | $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; |
| 467 | 467 | $sql .= ' fk_user_creat, fk_user_modif'; |
| 468 | 468 | $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t'; |
| 469 | - $sql .= ' WHERE t.rowid = ' . ((int)$id); |
|
| 469 | + $sql .= ' WHERE t.rowid = ' . ((int) $id); |
|
| 470 | 470 | $result = $this->db->query($sql); |
| 471 | 471 | if ($result) { |
| 472 | 472 | if ($this->db->num_rows($result)) { |
@@ -437,7 +437,6 @@ discard block |
||
| 437 | 437 | * Load object lines in memory from the database by type of product |
| 438 | 438 | * |
| 439 | 439 | * @param int $typeproduct 0 type product, 1 type service |
| 440 | - |
|
| 441 | 440 | * @return int Return integer <0 if KO, 0 if not found, >0 if OK |
| 442 | 441 | */ |
| 443 | 442 | public function fetchLinesbytypeproduct($typeproduct = 0) |
@@ -1206,7 +1205,7 @@ discard block |
||
| 1206 | 1205 | return $this->LibStatut($this->status, $mode); |
| 1207 | 1206 | } |
| 1208 | 1207 | |
| 1209 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1208 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1210 | 1209 | /** |
| 1211 | 1210 | * Return the status |
| 1212 | 1211 | * |
@@ -1216,7 +1215,7 @@ discard block |
||
| 1216 | 1215 | */ |
| 1217 | 1216 | public function LibStatut($status, $mode = 0) |
| 1218 | 1217 | { |
| 1219 | - // phpcs:enable |
|
| 1218 | + // phpcs:enable |
|
| 1220 | 1219 | if (empty($this->labelStatus)) { |
| 1221 | 1220 | global $langs; |
| 1222 | 1221 | //$langs->load("mrp"); |
@@ -1325,7 +1324,7 @@ discard block |
||
| 1325 | 1324 | } |
| 1326 | 1325 | } |
| 1327 | 1326 | |
| 1328 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1327 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1329 | 1328 | /** |
| 1330 | 1329 | * Return if at least one photo is available |
| 1331 | 1330 | * |
@@ -1334,7 +1333,7 @@ discard block |
||
| 1334 | 1333 | */ |
| 1335 | 1334 | public function is_photo_available($sdir) |
| 1336 | 1335 | { |
| 1337 | - // phpcs:enable |
|
| 1336 | + // phpcs:enable |
|
| 1338 | 1337 | include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; |
| 1339 | 1338 | include_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php'; |
| 1340 | 1339 | |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | */ |
| 64 | 64 | public function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) |
| 65 | 65 | { |
| 66 | - return -1; // Error by default, this method must be implemented by the driver |
|
| 66 | + return -1; // Error by default, this method must be implemented by the driver |
|
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | $action = GETPOST('action', 'aZ09'); |
| 53 | 53 | $value = GETPOST('value', 'alpha'); |
| 54 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 54 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 55 | 55 | |
| 56 | 56 | $label = GETPOST('label', 'alpha'); |
| 57 | 57 | $scandir = GETPOST('scan_dir', 'alpha'); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | // Search template files |
| 91 | 91 | $file = ''; |
| 92 | 92 | $classname = ''; |
| 93 | - $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
| 93 | + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
| 94 | 94 | foreach ($dirmodels as $reldir) { |
| 95 | 95 | $file = dol_buildpath($reldir . "core/modules/expensereport/doc/pdf_" . $modele . ".modules.php", 0); |
| 96 | 96 | if (file_exists($file)) { |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | * View |
| 189 | 189 | */ |
| 190 | 190 | |
| 191 | -$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
| 191 | +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
| 192 | 192 | |
| 193 | 193 | llxHeader('', $langs->trans("ExpenseReportsSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-expensereport'); |
| 194 | 194 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $arrayofexistingboxid = array(); |
| 99 | 99 | $nbboxonleft = $nbboxonright = 0; |
| 100 | 100 | $sql = "SELECT box_id, box_order FROM " . MAIN_DB_PREFIX . "boxes"; |
| 101 | - $sql .= " WHERE position = " . ((int)$pos) . " AND fk_user = " . ((int)$fk_user) . " AND entity = " . ((int)$conf->entity); |
|
| 101 | + $sql .= " WHERE position = " . ((int) $pos) . " AND fk_user = " . ((int) $fk_user) . " AND entity = " . ((int) $conf->entity); |
|
| 102 | 102 | dol_syslog("boxes.php activate box", LOG_DEBUG); |
| 103 | 103 | $resql = $db->query($sql); |
| 104 | 104 | if ($resql) { |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | $sql = "INSERT INTO " . MAIN_DB_PREFIX . "boxes ("; |
| 121 | 121 | $sql .= "box_id, position, box_order, fk_user, entity"; |
| 122 | 122 | $sql .= ") VALUES ("; |
| 123 | - $sql .= ((int)$boxid['value']) . ", " . ((int)$pos) . ", '" . (($nbboxonleft > $nbboxonright) ? 'B01' : 'A01') . "', " . ((int)$fk_user) . ", " . $conf->entity; |
|
| 123 | + $sql .= ((int) $boxid['value']) . ", " . ((int) $pos) . ", '" . (($nbboxonleft > $nbboxonright) ? 'B01' : 'A01') . "', " . ((int) $fk_user) . ", " . $conf->entity; |
|
| 124 | 124 | $sql .= ")"; |
| 125 | 125 | |
| 126 | 126 | dol_syslog("boxes.php activate box", LOG_DEBUG); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | |
| 148 | 148 | if ($action == 'delete') { |
| 149 | 149 | $sql = "SELECT box_id FROM " . MAIN_DB_PREFIX . "boxes"; |
| 150 | - $sql .= " WHERE rowid=" . ((int)$rowid); |
|
| 150 | + $sql .= " WHERE rowid=" . ((int) $rowid); |
|
| 151 | 151 | |
| 152 | 152 | $resql = $db->query($sql); |
| 153 | 153 | $obj = $db->fetch_object($resql); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | $sql = "DELETE FROM " . MAIN_DB_PREFIX . "boxes"; |
| 158 | 158 | $sql .= " WHERE entity = " . $conf->entity; |
| 159 | - $sql .= " AND box_id=" . ((int)$obj->box_id); |
|
| 159 | + $sql .= " AND box_id=" . ((int) $obj->box_id); |
|
| 160 | 160 | |
| 161 | 161 | $resql = $db->query($sql); |
| 162 | 162 | |
@@ -181,18 +181,18 @@ discard block |
||
| 181 | 181 | $newsecond = $objfrom->box_order; |
| 182 | 182 | if ($newfirst == $newsecond) { |
| 183 | 183 | $newsecondchar = preg_replace('/[0-9]+/', '', $newsecond); |
| 184 | - $newsecondnum = (int)preg_replace('/[a-zA-Z]+/', '', $newsecond); |
|
| 184 | + $newsecondnum = (int) preg_replace('/[a-zA-Z]+/', '', $newsecond); |
|
| 185 | 185 | $newsecond = sprintf("%s%02d", $newsecondchar ? $newsecondchar : 'A', $newsecondnum + 1); |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | - $sql = "UPDATE " . MAIN_DB_PREFIX . "boxes SET box_order='" . $db->escape($newfirst) . "' WHERE rowid=" . ((int)$objfrom->rowid); |
|
| 188 | + $sql = "UPDATE " . MAIN_DB_PREFIX . "boxes SET box_order='" . $db->escape($newfirst) . "' WHERE rowid=" . ((int) $objfrom->rowid); |
|
| 189 | 189 | dol_syslog($sql); |
| 190 | 190 | $resultupdatefrom = $db->query($sql); |
| 191 | 191 | if (!$resultupdatefrom) { |
| 192 | 192 | dol_print_error($db); |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | - $sql = "UPDATE " . MAIN_DB_PREFIX . "boxes SET box_order='" . $db->escape($newsecond) . "' WHERE rowid=" . ((int)$objto->rowid); |
|
| 195 | + $sql = "UPDATE " . MAIN_DB_PREFIX . "boxes SET box_order='" . $db->escape($newsecond) . "' WHERE rowid=" . ((int) $objto->rowid); |
|
| 196 | 196 | dol_syslog($sql); |
| 197 | 197 | $resultupdateto = $db->query($sql); |
| 198 | 198 | if (!$resultupdateto) { |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | // We renumber the order of the boxes if one of them is in '' |
| 259 | 259 | // This occurs just after an insert. |
| 260 | 260 | if ($decalage) { |
| 261 | - $sql = "UPDATE " . MAIN_DB_PREFIX . "boxes SET box_order='" . $db->escape($decalage) . "' WHERE rowid=" . ((int)$obj->rowid); |
|
| 261 | + $sql = "UPDATE " . MAIN_DB_PREFIX . "boxes SET box_order='" . $db->escape($decalage) . "' WHERE rowid=" . ((int) $obj->rowid); |
|
| 262 | 262 | $db->query($sql); |
| 263 | 263 | } |
| 264 | 264 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | $value = GETPOST('value', 'alpha'); |
| 53 | 53 | $label = GETPOST('label', 'alpha'); |
| 54 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 54 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 55 | 55 | |
| 56 | 56 | $scandir = GETPOST('scan_dir', 'alpha'); |
| 57 | 57 | $type = 'myobject'; |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $error = 0; |
| 77 | 77 | $setupnotempty = 0; |
| 78 | 78 | |
| 79 | -$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
| 79 | +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
| 80 | 80 | |
| 81 | 81 | // Access control |
| 82 | 82 | if (empty($user->admin)) { |