@@ -1989,7 +1989,7 @@ discard block |
||
1989 | 1989 | if ($tableName == "actioncomm") { |
1990 | 1990 | $sql .= " SET fk_project=".$this->id; |
1991 | 1991 | $sql .= " WHERE id=".((int) $elementSelectId); |
1992 | - } elseif (in_array($tableName, ["entrepot","mrp_mo","stocktransfer_stocktransfer"])) { |
|
1992 | + } elseif (in_array($tableName, ["entrepot", "mrp_mo", "stocktransfer_stocktransfer"])) { |
|
1993 | 1993 | $sql .= " SET fk_project=".$this->id; |
1994 | 1994 | $sql .= " WHERE rowid=".((int) $elementSelectId); |
1995 | 1995 | } else { |
@@ -2184,7 +2184,7 @@ discard block |
||
2184 | 2184 | $date = explode('-', $obj->element_date); |
2185 | 2185 | $week_number = getWeekNumber($date[2], $date[1], $date[0]); |
2186 | 2186 | } |
2187 | - '@phan-var-force int $week_number'; // Needed because phan considers it might be null |
|
2187 | + '@phan-var-force int $week_number'; // Needed because phan considers it might be null |
|
2188 | 2188 | if (empty($weekalreadyfound[$week_number])) { |
2189 | 2189 | $this->monthWorkLoad[$week_number] = $obj->element_duration; |
2190 | 2190 | $this->monthWorkLoadPerTask[$week_number][$obj->fk_element] = $obj->element_duration; |
@@ -2509,7 +2509,7 @@ discard block |
||
2509 | 2509 | $return .= '<br><span class="info-box-label opacitymedium">'.$langs->trans("Author").'</span>'; |
2510 | 2510 | $return .= '<span> : '.$user->getNomUrl(1).'</span>'; |
2511 | 2511 | }*/ |
2512 | - $return .= '<br><div>'; // start div line status |
|
2512 | + $return .= '<br><div>'; // start div line status |
|
2513 | 2513 | if ($this->usage_opportunity && $this->opp_status_code) { |
2514 | 2514 | //$return .= '<br><span class="info-bo-label opacitymedium">'.$langs->trans("OpportunityStatusShort").'</span>'; |
2515 | 2515 | //$return .= '<div class="small inline-block">'.dol_trunc($langs->trans("OppStatus".$this->opp_status_code), 5).'</div>'; |
@@ -2519,7 +2519,7 @@ discard block |
||
2519 | 2519 | if (method_exists($this, 'getLibStatut')) { |
2520 | 2520 | $return .= '<div class="info-box-status small inline-block valignmiddle">'.$this->getLibStatut(3).'</div>'; |
2521 | 2521 | } |
2522 | - $return .= '</div>'; // end div line status |
|
2522 | + $return .= '</div>'; // end div line status |
|
2523 | 2523 | |
2524 | 2524 | $return .= '</div>'; |
2525 | 2525 | $return .= '</div>'; |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | if (empty($this->piece_num)) { |
374 | 374 | $sqlnum = "SELECT MAX(piece_num)+1 as maxpiecenum"; |
375 | 375 | $sqlnum .= " FROM ".MAIN_DB_PREFIX.$this->table_element; |
376 | - $sqlnum .= " WHERE entity = " . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
376 | + $sqlnum .= " WHERE entity = ".((int) $conf->entity); // Do not use getEntity for accounting features |
|
377 | 377 | |
378 | 378 | $resqlnum = $this->db->query($sqlnum); |
379 | 379 | if ($resqlnum) { |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); |
556 | 556 | |
557 | 557 | global $action; |
558 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
558 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
559 | 559 | $parameters = array('id' => $this->id, 'getnomurl' => &$result); |
560 | 560 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
561 | 561 | if ($reshook > 0) { |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | $sql .= " t.date_validated as date_validation"; |
792 | 792 | $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.$mode.' as t'; |
793 | 793 | $sql .= ' WHERE 1 = 1'; |
794 | - $sql .= " AND entity = " . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
794 | + $sql .= " AND entity = ".((int) $conf->entity); // Do not use getEntity for accounting features |
|
795 | 795 | if (null !== $ref) { |
796 | 796 | $sql .= " AND t.rowid = ".((int) $ref); |
797 | 797 | } else { |
@@ -942,7 +942,7 @@ discard block |
||
942 | 942 | } |
943 | 943 | } |
944 | 944 | $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; |
945 | - $sql .= ' WHERE entity = ' . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
945 | + $sql .= ' WHERE entity = '.((int) $conf->entity); // Do not use getEntity for accounting features |
|
946 | 946 | if (count($sqlwhere) > 0) { |
947 | 947 | $sql .= " AND ".implode(" ".$this->db->sanitize($filtermode)." ", $sqlwhere); |
948 | 948 | } |
@@ -1109,7 +1109,7 @@ discard block |
||
1109 | 1109 | } |
1110 | 1110 | } |
1111 | 1111 | } |
1112 | - $sql .= ' WHERE t.entity = ' . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
1112 | + $sql .= ' WHERE t.entity = '.((int) $conf->entity); // Do not use getEntity for accounting features |
|
1113 | 1113 | if ($showAlreadyExportMovements == 0) { |
1114 | 1114 | $sql .= " AND t.date_export IS NULL"; |
1115 | 1115 | } |
@@ -1248,7 +1248,7 @@ discard block |
||
1248 | 1248 | } |
1249 | 1249 | } |
1250 | 1250 | } |
1251 | - $sql .= ' WHERE entity = ' . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
1251 | + $sql .= ' WHERE entity = '.((int) $conf->entity); // Do not use getEntity for accounting features |
|
1252 | 1252 | |
1253 | 1253 | if (count($sqlwhere) > 0) { |
1254 | 1254 | $sql .= " AND ".implode(" ".$this->db->sanitize($filtermode)." ", $sqlwhere); |
@@ -1621,7 +1621,7 @@ discard block |
||
1621 | 1621 | if (!empty($journal)) { |
1622 | 1622 | $sql .= " AND code_journal = '".$this->db->escape($journal)."'"; |
1623 | 1623 | } |
1624 | - $sql .= " AND entity = " . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
1624 | + $sql .= " AND entity = ".((int) $conf->entity); // Do not use getEntity for accounting features |
|
1625 | 1625 | // Exclusion of validated entries at the time of deletion |
1626 | 1626 | $sql .= " AND date_validated IS NULL"; |
1627 | 1627 | $sql .= $sql_filter; |
@@ -1666,8 +1666,8 @@ discard block |
||
1666 | 1666 | $sql = "DELETE"; |
1667 | 1667 | $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element.$mode; |
1668 | 1668 | $sql .= " WHERE piece_num = ".(int) $piecenum; |
1669 | - $sql .= " AND date_validated IS NULL"; // For security, exclusion of validated entries at the time of deletion |
|
1670 | - $sql .= " AND entity = " . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
1669 | + $sql .= " AND date_validated IS NULL"; // For security, exclusion of validated entries at the time of deletion |
|
1670 | + $sql .= " AND entity = ".((int) $conf->entity); // Do not use getEntity for accounting features |
|
1671 | 1671 | $sql .= $sql_filter; |
1672 | 1672 | |
1673 | 1673 | $resql = $this->db->query($sql); |
@@ -1792,7 +1792,7 @@ discard block |
||
1792 | 1792 | } |
1793 | 1793 | $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element.$mode; |
1794 | 1794 | $sql .= " WHERE piece_num = ".((int) $piecenum); |
1795 | - $sql .= " AND entity = " . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
1795 | + $sql .= " AND entity = ".((int) $conf->entity); // Do not use getEntity for accounting features |
|
1796 | 1796 | |
1797 | 1797 | dol_syslog(__METHOD__, LOG_DEBUG); |
1798 | 1798 | $result = $this->db->query($sql); |
@@ -1831,7 +1831,7 @@ discard block |
||
1831 | 1831 | global $conf; |
1832 | 1832 | |
1833 | 1833 | $sql = "SELECT MAX(piece_num)+1 as max FROM ".MAIN_DB_PREFIX.$this->table_element.$mode; |
1834 | - $sql .= " WHERE entity = " . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
1834 | + $sql .= " WHERE entity = ".((int) $conf->entity); // Do not use getEntity for accounting features |
|
1835 | 1835 | |
1836 | 1836 | dol_syslog(get_class($this)."::getNextNumMvt", LOG_DEBUG); |
1837 | 1837 | |
@@ -1875,7 +1875,7 @@ discard block |
||
1875 | 1875 | } |
1876 | 1876 | $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element.$mode; |
1877 | 1877 | $sql .= " WHERE piece_num = ".((int) $piecenum); |
1878 | - $sql .= " AND entity = " . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
1878 | + $sql .= " AND entity = ".((int) $conf->entity); // Do not use getEntity for accounting features |
|
1879 | 1879 | |
1880 | 1880 | dol_syslog(__METHOD__, LOG_DEBUG); |
1881 | 1881 | $result = $this->db->query($sql); |
@@ -1940,7 +1940,7 @@ discard block |
||
1940 | 1940 | $sql .= " montant as amount, sens, fk_user_author, import_key, code_journal, piece_num,"; |
1941 | 1941 | $sql .= " date_validated as date_validation"; |
1942 | 1942 | $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element; |
1943 | - $sql .= " WHERE entity = " . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
1943 | + $sql .= " WHERE entity = ".((int) $conf->entity); // Do not use getEntity for accounting features |
|
1944 | 1944 | |
1945 | 1945 | dol_syslog(get_class($this)."::export_bookkeeping", LOG_DEBUG); |
1946 | 1946 | |
@@ -2017,7 +2017,7 @@ discard block |
||
2017 | 2017 | |
2018 | 2018 | if (!$error) { |
2019 | 2019 | // Delete if there is an empty line |
2020 | - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num).' AND entity = ' .((int) $conf->entity)." AND numero_compte IS NULL AND debit = 0 AND credit = 0"; |
|
2020 | + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num).' AND entity = '.((int) $conf->entity)." AND numero_compte IS NULL AND debit = 0 AND credit = 0"; |
|
2021 | 2021 | $resql = $this->db->query($sql); |
2022 | 2022 | if (!$resql) { |
2023 | 2023 | $error++; |
@@ -2035,7 +2035,7 @@ discard block |
||
2035 | 2035 | $sql .= ' doc_ref, fk_doc, fk_docdet, entity, thirdparty_code, subledger_account, subledger_label,'; |
2036 | 2036 | $sql .= ' numero_compte, label_compte, label_operation, debit, credit,'; |
2037 | 2037 | $sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, '.((int) $next_piecenum).", '".$this->db->idate($now)."'"; |
2038 | - $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num).' AND numero_compte IS NOT NULL AND entity = ' .((int) $conf->entity); |
|
2038 | + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num).' AND numero_compte IS NOT NULL AND entity = '.((int) $conf->entity); |
|
2039 | 2039 | $sql .= $sql_filter; |
2040 | 2040 | $resql = $this->db->query($sql); |
2041 | 2041 | if (!$resql) { |
@@ -2046,7 +2046,7 @@ discard block |
||
2046 | 2046 | } |
2047 | 2047 | |
2048 | 2048 | if (!$error) { |
2049 | - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num).' AND entity = ' .((int) $conf->entity); |
|
2049 | + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num).' AND entity = '.((int) $conf->entity); |
|
2050 | 2050 | $resql = $this->db->query($sql); |
2051 | 2051 | if (!$resql) { |
2052 | 2052 | $error++; |
@@ -2056,7 +2056,7 @@ discard block |
||
2056 | 2056 | } |
2057 | 2057 | } elseif ($direction == 1) { |
2058 | 2058 | if (!$error) { |
2059 | - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num).' AND entity = ' .((int) $conf->entity); |
|
2059 | + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num).' AND entity = '.((int) $conf->entity); |
|
2060 | 2060 | $resql = $this->db->query($sql); |
2061 | 2061 | if (!$resql) { |
2062 | 2062 | $error++; |
@@ -2074,7 +2074,7 @@ discard block |
||
2074 | 2074 | $sql .= ' doc_ref, fk_doc, fk_docdet, thirdparty_code, subledger_account, subledger_label,'; |
2075 | 2075 | $sql .= ' numero_compte, label_compte, label_operation, debit, credit,'; |
2076 | 2076 | $sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, piece_num'; |
2077 | - $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' WHERE piece_num = '.((int) $piece_num).' AND entity = ' .((int) $conf->entity); |
|
2077 | + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' WHERE piece_num = '.((int) $piece_num).' AND entity = '.((int) $conf->entity); |
|
2078 | 2078 | $sql .= $sql_filter; |
2079 | 2079 | $resql = $this->db->query($sql); |
2080 | 2080 | if (!$resql) { |
@@ -2085,7 +2085,7 @@ discard block |
||
2085 | 2085 | } |
2086 | 2086 | |
2087 | 2087 | if (!$error) { |
2088 | - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num).' AND entity = ' .((int) $conf->entity); |
|
2088 | + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num).' AND entity = '.((int) $conf->entity); |
|
2089 | 2089 | $sql .= $sql_filter; |
2090 | 2090 | $resql = $this->db->query($sql); |
2091 | 2091 | if (!$resql) { |
@@ -2142,7 +2142,7 @@ discard block |
||
2142 | 2142 | $sql .= " AND aa.active = 1"; |
2143 | 2143 | $sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version"; |
2144 | 2144 | $sql .= " AND asy.rowid = ".((int) $pcgver); |
2145 | - $sql .= " AND ab.entity = " . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
2145 | + $sql .= " AND ab.entity = ".((int) $conf->entity); // Do not use getEntity for accounting features |
|
2146 | 2146 | $sql .= " ORDER BY account_number ASC"; |
2147 | 2147 | |
2148 | 2148 | dol_syslog(get_class($this)."::select_account", LOG_DEBUG); |
@@ -2206,7 +2206,7 @@ discard block |
||
2206 | 2206 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as parent ON aa.account_parent = parent.rowid AND parent.active = 1"; |
2207 | 2207 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as root ON parent.account_parent = root.rowid AND root.active = 1"; |
2208 | 2208 | $sql .= " WHERE aa.account_number = '".$this->db->escape($account)."'"; |
2209 | - $sql .= " AND aa.entity = " . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
2209 | + $sql .= " AND aa.entity = ".((int) $conf->entity); // Do not use getEntity for accounting features |
|
2210 | 2210 | |
2211 | 2211 | dol_syslog(get_class($this)."::select_account", LOG_DEBUG); |
2212 | 2212 | $resql = $this->db->query($sql); |
@@ -2246,7 +2246,7 @@ discard block |
||
2246 | 2246 | $sql .= " AND asy.rowid = ".((int) $pcgver); |
2247 | 2247 | $sql .= " AND aa.active = 1"; |
2248 | 2248 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_accounting_category as cat ON aa.fk_accounting_category = cat.rowid"; |
2249 | - $sql .= " WHERE aa.entity = " . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
2249 | + $sql .= " WHERE aa.entity = ".((int) $conf->entity); // Do not use getEntity for accounting features |
|
2250 | 2250 | |
2251 | 2251 | dol_syslog(get_class($this)."::select_account", LOG_DEBUG); |
2252 | 2252 | $resql = $this->db->query($sql); |
@@ -2279,7 +2279,7 @@ discard block |
||
2279 | 2279 | global $conf; |
2280 | 2280 | |
2281 | 2281 | $alias = trim($alias); |
2282 | - $alias = !empty($alias) && strpos($alias, '.') < 0 ? $alias . "." : $alias; |
|
2282 | + $alias = !empty($alias) && strpos($alias, '.') < 0 ? $alias."." : $alias; |
|
2283 | 2283 | |
2284 | 2284 | if (!isset(self::$can_modify_bookkeeping_sql_cached[$alias]) || $force) { |
2285 | 2285 | $result = $this->loadFiscalPeriods($force, 'active'); |
@@ -2290,10 +2290,10 @@ discard block |
||
2290 | 2290 | $sql_list = array(); |
2291 | 2291 | if (!empty($conf->cache['active_fiscal_period_cached']) && is_array($conf->cache['active_fiscal_period_cached'])) { |
2292 | 2292 | foreach ($conf->cache['active_fiscal_period_cached'] as $fiscal_period) { |
2293 | - $sql_list[] = "('" . $this->db->idate($fiscal_period['date_start']) . "' <= {$alias}doc_date AND {$alias}doc_date <= '" . $this->db->idate($fiscal_period['date_end']) . "')"; |
|
2293 | + $sql_list[] = "('".$this->db->idate($fiscal_period['date_start'])."' <= {$alias}doc_date AND {$alias}doc_date <= '".$this->db->idate($fiscal_period['date_end'])."')"; |
|
2294 | 2294 | } |
2295 | 2295 | } |
2296 | - self::$can_modify_bookkeeping_sql_cached[$alias] = !empty($sql_list) ? ' AND (' . $this->db->sanitize(implode(' OR ', $sql_list), 1, 1, 1) . ')' : ''; |
|
2296 | + self::$can_modify_bookkeeping_sql_cached[$alias] = !empty($sql_list) ? ' AND ('.$this->db->sanitize(implode(' OR ', $sql_list), 1, 1, 1).')' : ''; |
|
2297 | 2297 | } |
2298 | 2298 | |
2299 | 2299 | return self::$can_modify_bookkeeping_sql_cached[$alias]; |
@@ -2413,8 +2413,8 @@ discard block |
||
2413 | 2413 | if ($mode == 'active') { |
2414 | 2414 | if (!isset($conf->cache['active_fiscal_period_cached']) || $force) { |
2415 | 2415 | $sql = "SELECT date_start, date_end"; |
2416 | - $sql .= " FROM " . $this->db->prefix() . "accounting_fiscalyear"; |
|
2417 | - $sql .= " WHERE entity = " . ((int) $conf->entity); |
|
2416 | + $sql .= " FROM ".$this->db->prefix()."accounting_fiscalyear"; |
|
2417 | + $sql .= " WHERE entity = ".((int) $conf->entity); |
|
2418 | 2418 | $sql .= " AND statut = 0"; |
2419 | 2419 | |
2420 | 2420 | $resql = $this->db->query($sql); |
@@ -2436,8 +2436,8 @@ discard block |
||
2436 | 2436 | if ($mode == 'closed') { |
2437 | 2437 | if (!isset($conf->cache['closed_fiscal_period_cached']) || $force) { |
2438 | 2438 | $sql = "SELECT date_start, date_end"; |
2439 | - $sql .= " FROM " . $this->db->prefix() . "accounting_fiscalyear"; |
|
2440 | - $sql .= " WHERE entity = " . ((int) $conf->entity); |
|
2439 | + $sql .= " FROM ".$this->db->prefix()."accounting_fiscalyear"; |
|
2440 | + $sql .= " WHERE entity = ".((int) $conf->entity); |
|
2441 | 2441 | $sql .= " AND statut = 1"; |
2442 | 2442 | |
2443 | 2443 | $resql = $this->db->query($sql); |
@@ -2472,10 +2472,10 @@ discard block |
||
2472 | 2472 | $list = array(); |
2473 | 2473 | |
2474 | 2474 | $sql = "SELECT rowid, label, date_start, date_end, statut"; |
2475 | - $sql .= " FROM " . $this->db->prefix() . "accounting_fiscalyear"; |
|
2476 | - $sql .= " WHERE entity = " . ((int) $conf->entity); |
|
2475 | + $sql .= " FROM ".$this->db->prefix()."accounting_fiscalyear"; |
|
2476 | + $sql .= " WHERE entity = ".((int) $conf->entity); |
|
2477 | 2477 | if (!empty($filter)) { |
2478 | - $sql .= " AND (" . $this->db->sanitize($filter, 1, 1, 1) . ')'; |
|
2478 | + $sql .= " AND (".$this->db->sanitize($filter, 1, 1, 1).')'; |
|
2479 | 2479 | } |
2480 | 2480 | $sql .= $this->db->order('date_start', 'ASC'); |
2481 | 2481 | |
@@ -2512,13 +2512,13 @@ discard block |
||
2512 | 2512 | |
2513 | 2513 | $sql = "SELECT YEAR(b.doc_date) as year"; |
2514 | 2514 | for ($i = 1; $i <= 12; $i++) { |
2515 | - $sql .= ", SUM(".$this->db->ifsql("MONTH(b.doc_date) = ".((int) $i), "1", "0") . ") AS month".((int) $i); |
|
2515 | + $sql .= ", SUM(".$this->db->ifsql("MONTH(b.doc_date) = ".((int) $i), "1", "0").") AS month".((int) $i); |
|
2516 | 2516 | } |
2517 | 2517 | $sql .= ", COUNT(b.rowid) as total"; |
2518 | - $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as b"; |
|
2519 | - $sql .= " WHERE b.doc_date >= '" . $this->db->idate($date_start) . "'"; |
|
2520 | - $sql .= " AND b.doc_date <= '" . $this->db->idate($date_end) . "'"; |
|
2521 | - $sql .= " AND b.entity IN (" . getEntity('bookkeeping', 0) . ")"; // We don't share object for accountancy |
|
2518 | + $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b"; |
|
2519 | + $sql .= " WHERE b.doc_date >= '".$this->db->idate($date_start)."'"; |
|
2520 | + $sql .= " AND b.doc_date <= '".$this->db->idate($date_end)."'"; |
|
2521 | + $sql .= " AND b.entity IN (".getEntity('bookkeeping', 0).")"; // We don't share object for accountancy |
|
2522 | 2522 | |
2523 | 2523 | // Get count for each month into the fiscal period |
2524 | 2524 | if (getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) { |
@@ -2548,7 +2548,7 @@ discard block |
||
2548 | 2548 | 'total' => (int) $obj->total, |
2549 | 2549 | ); |
2550 | 2550 | for ($i = 1; $i <= 12; $i++) { |
2551 | - $year_list['count'][$i] = (int) $obj->{'month' . $i}; |
|
2551 | + $year_list['count'][$i] = (int) $obj->{'month'.$i}; |
|
2552 | 2552 | } |
2553 | 2553 | |
2554 | 2554 | $list[] = $year_list; |
@@ -2576,11 +2576,11 @@ discard block |
||
2576 | 2576 | $now = dol_now(); |
2577 | 2577 | |
2578 | 2578 | // Specify as export : update field date_validated on selected month/year |
2579 | - $sql = " UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping"; |
|
2580 | - $sql .= " SET date_validated = '" . $this->db->idate($now) . "'"; |
|
2581 | - $sql .= " WHERE entity = " . ((int) $conf->entity); |
|
2582 | - $sql .= " AND DATE(doc_date) >= '" . $this->db->idate($date_start) . "'"; |
|
2583 | - $sql .= " AND DATE(doc_date) <= '" . $this->db->idate($date_end) . "'"; |
|
2579 | + $sql = " UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping"; |
|
2580 | + $sql .= " SET date_validated = '".$this->db->idate($now)."'"; |
|
2581 | + $sql .= " WHERE entity = ".((int) $conf->entity); |
|
2582 | + $sql .= " AND DATE(doc_date) >= '".$this->db->idate($date_start)."'"; |
|
2583 | + $sql .= " AND DATE(doc_date) <= '".$this->db->idate($date_end)."'"; |
|
2584 | 2584 | $sql .= " AND date_validated IS NULL"; |
2585 | 2585 | |
2586 | 2586 | dol_syslog(__METHOD__, LOG_DEBUG); |
@@ -2613,27 +2613,27 @@ discard block |
||
2613 | 2613 | |
2614 | 2614 | $pcg_type_filter = array(); |
2615 | 2615 | foreach ($accounting_groups_used_for_income_statement as $item) { |
2616 | - $pcg_type_filter[] = "'" . $this->db->escape($item) . "'"; |
|
2616 | + $pcg_type_filter[] = "'".$this->db->escape($item)."'"; |
|
2617 | 2617 | } |
2618 | 2618 | |
2619 | 2619 | $sql = 'SELECT'; |
2620 | 2620 | $sql .= " t.numero_compte,"; |
2621 | 2621 | $sql .= " aa.pcg_type,"; |
2622 | 2622 | $sql .= " (SUM(t.credit) - SUM(t.debit)) as accounting_result"; |
2623 | - $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t'; |
|
2624 | - $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'accounting_account as aa ON aa.account_number = t.numero_compte'; |
|
2625 | - $sql .= ' WHERE t.entity = ' . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
2626 | - $sql .= " AND aa.entity = " . ((int) $conf->entity); |
|
2627 | - $sql .= ' AND aa.fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid = ' . ((int) getDolGlobalInt('CHARTOFACCOUNTS')) . ')'; |
|
2628 | - $sql .= ' AND aa.pcg_type IN (' . $this->db->sanitize(implode(',', $pcg_type_filter), 1) . ')'; |
|
2629 | - $sql .= " AND DATE(t.doc_date) >= '" . $this->db->idate($date_start) . "'"; |
|
2630 | - $sql .= " AND DATE(t.doc_date) <= '" . $this->db->idate($date_end) . "'"; |
|
2623 | + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; |
|
2624 | + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'accounting_account as aa ON aa.account_number = t.numero_compte'; |
|
2625 | + $sql .= ' WHERE t.entity = '.((int) $conf->entity); // Do not use getEntity for accounting features |
|
2626 | + $sql .= " AND aa.entity = ".((int) $conf->entity); |
|
2627 | + $sql .= ' AND aa.fk_pcg_version IN (SELECT pcg_version FROM '.MAIN_DB_PREFIX.'accounting_system WHERE rowid = '.((int) getDolGlobalInt('CHARTOFACCOUNTS')).')'; |
|
2628 | + $sql .= ' AND aa.pcg_type IN ('.$this->db->sanitize(implode(',', $pcg_type_filter), 1).')'; |
|
2629 | + $sql .= " AND DATE(t.doc_date) >= '".$this->db->idate($date_start)."'"; |
|
2630 | + $sql .= " AND DATE(t.doc_date) <= '".$this->db->idate($date_end)."'"; |
|
2631 | 2631 | $sql .= ' GROUP BY t.numero_compte, aa.pcg_type'; |
2632 | 2632 | |
2633 | 2633 | $resql = $this->db->query($sql); |
2634 | 2634 | if (!$resql) { |
2635 | - $this->errors[] = 'Error ' . $this->db->lasterror(); |
|
2636 | - dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR); |
|
2635 | + $this->errors[] = 'Error '.$this->db->lasterror(); |
|
2636 | + dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR); |
|
2637 | 2637 | } else { |
2638 | 2638 | while ($obj = $this->db->fetch_object($resql)) { |
2639 | 2639 | $income_statement_amount += $obj->accounting_result; |
@@ -2672,7 +2672,7 @@ discard block |
||
2672 | 2672 | return -1; |
2673 | 2673 | } elseif (empty($fiscal_period->id)) { |
2674 | 2674 | $langs->loadLangs(array('errors', 'compta')); |
2675 | - $this->errors[] = $langs->trans('ErrorRecordNotFound') . ' - ' . $langs->trans('FiscalPeriod') . ' (' . $fiscal_period_id . ')'; |
|
2675 | + $this->errors[] = $langs->trans('ErrorRecordNotFound').' - '.$langs->trans('FiscalPeriod').' ('.$fiscal_period_id.')'; |
|
2676 | 2676 | return -1; |
2677 | 2677 | } |
2678 | 2678 | |
@@ -2691,7 +2691,7 @@ discard block |
||
2691 | 2691 | return -1; |
2692 | 2692 | } elseif (empty($new_fiscal_period->id)) { |
2693 | 2693 | $langs->loadLangs(array('errors', 'compta')); |
2694 | - $this->errors[] = $langs->trans('ErrorRecordNotFound') . ' - ' . $langs->trans('FiscalPeriod') . ' (' . $new_fiscal_period_id . ')'; |
|
2694 | + $this->errors[] = $langs->trans('ErrorRecordNotFound').' - '.$langs->trans('FiscalPeriod').' ('.$new_fiscal_period_id.')'; |
|
2695 | 2695 | return -1; |
2696 | 2696 | } |
2697 | 2697 | |
@@ -2711,7 +2711,7 @@ discard block |
||
2711 | 2711 | $journal_id = max(0, getDolGlobalString('ACCOUNTING_CLOSURE_DEFAULT_JOURNAL')); |
2712 | 2712 | if (empty($journal_id)) { |
2713 | 2713 | $langs->loadLangs(array('errors', 'accountancy')); |
2714 | - $this->errors[] = $langs->trans('ErrorBadParameters') . ' - ' . $langs->trans('Codejournal') . ' (' . $langs->trans('AccountingJournalType9') . ')'; |
|
2714 | + $this->errors[] = $langs->trans('ErrorBadParameters').' - '.$langs->trans('Codejournal').' ('.$langs->trans('AccountingJournalType9').')'; |
|
2715 | 2715 | $error++; |
2716 | 2716 | } |
2717 | 2717 | |
@@ -2725,7 +2725,7 @@ discard block |
||
2725 | 2725 | $error++; |
2726 | 2726 | } elseif ($result == 0) { |
2727 | 2727 | $langs->loadLangs(array('errors', 'accountancy')); |
2728 | - $this->errors[] = $langs->trans('ErrorRecordNotFound') . ' - ' . $langs->trans('Codejournal') . ' (' . $langs->trans('AccountingJournalType9') . ')'; |
|
2728 | + $this->errors[] = $langs->trans('ErrorRecordNotFound').' - '.$langs->trans('Codejournal').' ('.$langs->trans('AccountingJournalType9').')'; |
|
2729 | 2729 | $error++; |
2730 | 2730 | } |
2731 | 2731 | } |
@@ -2737,7 +2737,7 @@ discard block |
||
2737 | 2737 | $pcg_type_filter = array(); |
2738 | 2738 | $tmp = array_merge($accounting_groups_used_for_balance_sheet_account, $accounting_groups_used_for_income_statement); |
2739 | 2739 | foreach ($tmp as $item) { |
2740 | - $pcg_type_filter[] = "'" . $this->db->escape($item) . "'"; |
|
2740 | + $pcg_type_filter[] = "'".$this->db->escape($item)."'"; |
|
2741 | 2741 | } |
2742 | 2742 | |
2743 | 2743 | $sql = 'SELECT'; |
@@ -2749,14 +2749,14 @@ discard block |
||
2749 | 2749 | } |
2750 | 2750 | $sql .= " aa.pcg_type,"; |
2751 | 2751 | $sql .= " (SUM(t.credit) - SUM(t.debit)) as opening_balance"; |
2752 | - $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t'; |
|
2753 | - $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'accounting_account as aa ON aa.account_number = t.numero_compte'; |
|
2754 | - $sql .= ' WHERE t.entity = ' . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
2755 | - $sql .= " AND aa.entity = ". ((int) $conf->entity); |
|
2752 | + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; |
|
2753 | + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'accounting_account as aa ON aa.account_number = t.numero_compte'; |
|
2754 | + $sql .= ' WHERE t.entity = '.((int) $conf->entity); // Do not use getEntity for accounting features |
|
2755 | + $sql .= " AND aa.entity = ".((int) $conf->entity); |
|
2756 | 2756 | $sql .= ' AND aa.fk_pcg_version IN (SELECT pcg_version FROM '.MAIN_DB_PREFIX.'accounting_system WHERE rowid = '.((int) getDolGlobalInt('CHARTOFACCOUNTS')).')'; |
2757 | - $sql .= ' AND aa.pcg_type IN (' . $this->db->sanitize(implode(',', $pcg_type_filter), 1) . ')'; |
|
2758 | - $sql .= " AND DATE(t.doc_date) >= '" . $this->db->idate($fiscal_period->date_start) . "'"; |
|
2759 | - $sql .= " AND DATE(t.doc_date) <= '" . $this->db->idate($fiscal_period->date_end) . "'"; |
|
2757 | + $sql .= ' AND aa.pcg_type IN ('.$this->db->sanitize(implode(',', $pcg_type_filter), 1).')'; |
|
2758 | + $sql .= " AND DATE(t.doc_date) >= '".$this->db->idate($fiscal_period->date_start)."'"; |
|
2759 | + $sql .= " AND DATE(t.doc_date) <= '".$this->db->idate($fiscal_period->date_end)."'"; |
|
2760 | 2760 | $sql .= ' GROUP BY t.numero_compte, t.label_compte, aa.pcg_type'; |
2761 | 2761 | if ($separate_auxiliary_account) { |
2762 | 2762 | $sql .= ' ,t.subledger_account, t.subledger_label'; |
@@ -2765,8 +2765,8 @@ discard block |
||
2765 | 2765 | |
2766 | 2766 | $resql = $this->db->query($sql); |
2767 | 2767 | if (!$resql) { |
2768 | - $this->errors[] = 'Error ' . $this->db->lasterror(); |
|
2769 | - dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR); |
|
2768 | + $this->errors[] = 'Error '.$this->db->lasterror(); |
|
2769 | + dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR); |
|
2770 | 2770 | |
2771 | 2771 | $error++; |
2772 | 2772 | } else { |
@@ -2908,7 +2908,7 @@ discard block |
||
2908 | 2908 | return -1; |
2909 | 2909 | } elseif (empty($fiscal_period->id)) { |
2910 | 2910 | $langs->loadLangs(array('errors', 'compta')); |
2911 | - $this->errors[] = $langs->trans('ErrorRecordNotFound') . ' - ' . $langs->trans('FiscalPeriod') . ' (' . $fiscal_period_id . ')'; |
|
2911 | + $this->errors[] = $langs->trans('ErrorRecordNotFound').' - '.$langs->trans('FiscalPeriod').' ('.$fiscal_period_id.')'; |
|
2912 | 2912 | return -1; |
2913 | 2913 | } |
2914 | 2914 | |
@@ -2927,7 +2927,7 @@ discard block |
||
2927 | 2927 | return -1; |
2928 | 2928 | } elseif (empty($new_fiscal_period->id)) { |
2929 | 2929 | $langs->loadLangs(array('errors', 'compta')); |
2930 | - $this->errors[] = $langs->trans('ErrorRecordNotFound') . ' - ' . $langs->trans('FiscalPeriod') . ' (' . $new_fiscal_period_id . ')'; |
|
2930 | + $this->errors[] = $langs->trans('ErrorRecordNotFound').' - '.$langs->trans('FiscalPeriod').' ('.$new_fiscal_period_id.')'; |
|
2931 | 2931 | return -1; |
2932 | 2932 | } |
2933 | 2933 | |
@@ -2947,7 +2947,7 @@ discard block |
||
2947 | 2947 | return -1; |
2948 | 2948 | } elseif ($result == 0) { |
2949 | 2949 | $langs->loadLangs(array('errors', 'accountancy')); |
2950 | - $this->errors[] = $langs->trans('ErrorRecordNotFound') . ' - ' . $langs->trans('InventoryJournal'); |
|
2950 | + $this->errors[] = $langs->trans('ErrorRecordNotFound').' - '.$langs->trans('InventoryJournal'); |
|
2951 | 2951 | return -1; |
2952 | 2952 | } |
2953 | 2953 | |
@@ -2955,18 +2955,18 @@ discard block |
||
2955 | 2955 | $this->db->begin(); |
2956 | 2956 | |
2957 | 2957 | $sql = 'SELECT t.rowid'; |
2958 | - $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t'; |
|
2959 | - $sql .= ' WHERE t.entity = ' . ((int) $conf->entity); // Do not use getEntity for accounting features |
|
2960 | - $sql .= " AND code_journal = '" . $this->db->escape($inventory_journal->code) . "'"; |
|
2961 | - $sql .= " AND DATE(t.doc_date) >= '" . $this->db->idate($date_start) . "'"; |
|
2962 | - $sql .= " AND DATE(t.doc_date) <= '" . $this->db->idate($date_end) . "'"; |
|
2963 | - $sql .= " AND DATE(t.doc_date) >= '" . $this->db->idate($fiscal_period->date_start) . "'"; |
|
2964 | - $sql .= " AND DATE(t.doc_date) <= '" . $this->db->idate($fiscal_period->date_end) . "'"; |
|
2958 | + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; |
|
2959 | + $sql .= ' WHERE t.entity = '.((int) $conf->entity); // Do not use getEntity for accounting features |
|
2960 | + $sql .= " AND code_journal = '".$this->db->escape($inventory_journal->code)."'"; |
|
2961 | + $sql .= " AND DATE(t.doc_date) >= '".$this->db->idate($date_start)."'"; |
|
2962 | + $sql .= " AND DATE(t.doc_date) <= '".$this->db->idate($date_end)."'"; |
|
2963 | + $sql .= " AND DATE(t.doc_date) >= '".$this->db->idate($fiscal_period->date_start)."'"; |
|
2964 | + $sql .= " AND DATE(t.doc_date) <= '".$this->db->idate($fiscal_period->date_end)."'"; |
|
2965 | 2965 | |
2966 | 2966 | $resql = $this->db->query($sql); |
2967 | 2967 | if (!$resql) { |
2968 | - $this->errors[] = 'Error ' . $this->db->lasterror(); |
|
2969 | - dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR); |
|
2968 | + $this->errors[] = 'Error '.$this->db->lasterror(); |
|
2969 | + dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR); |
|
2970 | 2970 | |
2971 | 2971 | $error++; |
2972 | 2972 | } else { |
@@ -2981,7 +2981,7 @@ discard block |
||
2981 | 2981 | break; |
2982 | 2982 | } elseif ($result == 0) { |
2983 | 2983 | $langs->loadLangs(array('errors', 'accountancy')); |
2984 | - $this->errors[] = $langs->trans('ErrorRecordNotFound') . ' - ' . $langs->trans('LineId') . ': ' . $obj->rowid; |
|
2984 | + $this->errors[] = $langs->trans('ErrorRecordNotFound').' - '.$langs->trans('LineId').': '.$obj->rowid; |
|
2985 | 2985 | $error++; |
2986 | 2986 | break; |
2987 | 2987 | } |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | } else { |
445 | 445 | $familykey = $objMod->family; |
446 | 446 | } |
447 | - '@phan-var-force string $familykey'; // if not, phan considers $familykey may be null |
|
447 | + '@phan-var-force string $familykey'; // if not, phan considers $familykey may be null |
|
448 | 448 | |
449 | 449 | $moduleposition = ($objMod->module_position ? $objMod->module_position : '50'); |
450 | 450 | if ($objMod->isCoreOrExternalModule() == 'external' && $moduleposition < 100000) { |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup'); |
551 | 551 | |
552 | 552 | // Start to show page |
553 | -$deschelp = ''; |
|
553 | +$deschelp = ''; |
|
554 | 554 | if ($mode == 'common' || $mode == 'commonkanban') { |
555 | 555 | $desc = $langs->trans("ModulesDesc", '{picto}'); |
556 | 556 | $desc .= ' '.$langs->trans("ModulesDesc2", '{picto2}'); |
@@ -1157,7 +1157,7 @@ discard block |
||
1157 | 1157 | <div id="category-tree-left"> |
1158 | 1158 | <ul class="tree"> |
1159 | 1159 | <?php |
1160 | - echo $dolistore->get_categories(); // Do not use dol_escape_htmltag here, it is already a structured content?> |
|
1160 | + echo $dolistore->get_categories(); // Do not use dol_escape_htmltag here, it is already a structured content?> |
|
1161 | 1161 | </ul> |
1162 | 1162 | </div> |
1163 | 1163 | <div id="listing-content"> |
@@ -1030,7 +1030,7 @@ discard block |
||
1030 | 1030 | 'start' => isset($value['start']) ? $value['start'] : '', |
1031 | 1031 | 'end' => isset($value['end']) ? $value['end'] : '' |
1032 | 1032 | ); |
1033 | - $out = '<div ' . ($moreparam ? $moreparam : '') . '><div class="nowrap">'; |
|
1033 | + $out = '<div '.($moreparam ? $moreparam : '').'><div class="nowrap">'; |
|
1034 | 1034 | $out .= $form->selectDate($prefill['start'], $keyprefix.$key.$keysuffix.'_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From")); |
1035 | 1035 | $out .= '</div><div class="nowrap">'; |
1036 | 1036 | $out .= $form->selectDate($prefill['end'], $keyprefix.$key.$keysuffix.'_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to")); |
@@ -1055,7 +1055,7 @@ discard block |
||
1055 | 1055 | 'start' => isset($value['start']) ? $value['start'] : '', |
1056 | 1056 | 'end' => isset($value['end']) ? $value['end'] : '' |
1057 | 1057 | ); |
1058 | - $out = '<div ' . ($moreparam ? $moreparam : '') . '><div class="nowrap">'; |
|
1058 | + $out = '<div '.($moreparam ? $moreparam : '').'><div class="nowrap">'; |
|
1059 | 1059 | $out .= $form->selectDate($prefill['start'], $keyprefix.$key.$keysuffix.'_start', 1, 1, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"), 'tzuserrel'); |
1060 | 1060 | $out .= '</div><div class="nowrap">'; |
1061 | 1061 | $out .= $form->selectDate($prefill['end'], $keyprefix.$key.$keysuffix.'_end', 1, 1, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"), 'tzuserrel'); |
@@ -1126,7 +1126,7 @@ discard block |
||
1126 | 1126 | } else { |
1127 | 1127 | $out = $form->selectyesno($keyprefix.$key.$keysuffix, $value, 1, false, 1); |
1128 | 1128 | } |
1129 | - $out .= '<input type="hidden" name="'.$keyprefix.$key.$keysuffix.'_boolean" value="1">'; // A hidden field ending with "_boolean" that is always set to 1. |
|
1129 | + $out .= '<input type="hidden" name="'.$keyprefix.$key.$keysuffix.'_boolean" value="1">'; // A hidden field ending with "_boolean" that is always set to 1. |
|
1130 | 1130 | } elseif ($type == 'price') { |
1131 | 1131 | if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format. |
1132 | 1132 | $value = price($value); |
@@ -1595,7 +1595,7 @@ discard block |
||
1595 | 1595 | |
1596 | 1596 | $tmparray = explode(':', $param_list[0]); |
1597 | 1597 | |
1598 | - $element = $extrafieldsobjectkey; // $extrafieldsobjectkey comes from $object->table_element but we need $object->element |
|
1598 | + $element = $extrafieldsobjectkey; // $extrafieldsobjectkey comes from $object->table_element but we need $object->element |
|
1599 | 1599 | if ($element == 'socpeople') { |
1600 | 1600 | $element = 'contact'; |
1601 | 1601 | } elseif ($element == 'projet') { |
@@ -1643,7 +1643,7 @@ discard block |
||
1643 | 1643 | |
1644 | 1644 | $label = $this->attributes[$extrafieldsobjectkey]['label'][$key]; |
1645 | 1645 | $type = $this->attributes[$extrafieldsobjectkey]['type'][$key]; |
1646 | - $size = $this->attributes[$extrafieldsobjectkey]['size'][$key]; // Can be '255', '24,8'... |
|
1646 | + $size = $this->attributes[$extrafieldsobjectkey]['size'][$key]; // Can be '255', '24,8'... |
|
1647 | 1647 | $default = $this->attributes[$extrafieldsobjectkey]['default'][$key]; |
1648 | 1648 | $computed = $this->attributes[$extrafieldsobjectkey]['computed'][$key]; |
1649 | 1649 | $unique = $this->attributes[$extrafieldsobjectkey]['unique'][$key]; |
@@ -1665,7 +1665,7 @@ discard block |
||
1665 | 1665 | if ($type == 'date') { |
1666 | 1666 | $showsize = 10; |
1667 | 1667 | if ($value !== '') { |
1668 | - $value = dol_print_date($value, 'day'); // For date without hour, date is always GMT for storage and output |
|
1668 | + $value = dol_print_date($value, 'day'); // For date without hour, date is always GMT for storage and output |
|
1669 | 1669 | } |
1670 | 1670 | } elseif ($type == 'datetime') { |
1671 | 1671 | $showsize = 19; |
@@ -1809,13 +1809,13 @@ discard block |
||
1809 | 1809 | $toprint = array(); |
1810 | 1810 | $obj = $this->db->fetch_object($resql); |
1811 | 1811 | if ($obj->rowid) { |
1812 | - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
1812 | + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
1813 | 1813 | $c = new Categorie($this->db); |
1814 | 1814 | $result = $c->fetch($obj->rowid); |
1815 | 1815 | if ($result > 0) { |
1816 | 1816 | $ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text |
1817 | 1817 | foreach ($ways as $way) { |
1818 | - $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . img_object('', 'category') . ' ' . $way . '</li>'; |
|
1818 | + $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"'.($c->color ? ' style="background: #'.$c->color.';"' : ' style="background: #bbb"').'>'.img_object('', 'category').' '.$way.'</li>'; |
|
1819 | 1819 | } |
1820 | 1820 | } |
1821 | 1821 | } |
@@ -2055,12 +2055,12 @@ discard block |
||
2055 | 2055 | if ($mode == 'create') { |
2056 | 2056 | // On create mode, force separator group to not be collapsible |
2057 | 2057 | $extrafield_collapse_display_value = 1; |
2058 | - $expand_display = true; // We force group to be shown expanded |
|
2058 | + $expand_display = true; // We force group to be shown expanded |
|
2059 | 2059 | $disabledcookiewrite = 1; // We keep status of group unchanged into the cookie |
2060 | 2060 | } |
2061 | 2061 | |
2062 | 2062 | $out = '<'.$tagtype.' id="trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').'" class="trextrafieldseparator trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').'">'; |
2063 | - $out .= '<'.$tagtype_dyn.' '.(!empty($colspan) ? 'colspan="' . $colspan . '"' : '').'>'; |
|
2063 | + $out .= '<'.$tagtype_dyn.' '.(!empty($colspan) ? 'colspan="'.$colspan.'"' : '').'>'; |
|
2064 | 2064 | // Some js code will be injected here to manage the collapsing of extrafields |
2065 | 2065 | // Output the picto |
2066 | 2066 | $out .= '<span class="'.($extrafield_collapse_display_value ? 'cursorpointer ' : '').($extrafield_collapse_display_value == 0 ? 'fas fa-square opacitymedium' : 'far fa-'.(($expand_display ? 'minus' : 'plus').'-square')).'"></span>'; |
@@ -2142,7 +2142,7 @@ discard block |
||
2142 | 2142 | continue; |
2143 | 2143 | } |
2144 | 2144 | |
2145 | - if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && (! in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst')))) { |
|
2145 | + if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && (!in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst')))) { |
|
2146 | 2146 | //when unticking boolean field, it's not set in POST |
2147 | 2147 | continue; |
2148 | 2148 | } |
@@ -2171,7 +2171,7 @@ discard block |
||
2171 | 2171 | $onlykey === '@GETPOSTISSET' |
2172 | 2172 | && in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst')) |
2173 | 2173 | && in_array(abs($enabled), array(2, 5)) |
2174 | - && ! GETPOSTISSET('options_' . $key) // Update hidden checkboxes and multiselect only if they are provided |
|
2174 | + && !GETPOSTISSET('options_'.$key) // Update hidden checkboxes and multiselect only if they are provided |
|
2175 | 2175 | ) |
2176 | 2176 | ) { |
2177 | 2177 | continue; |
@@ -2298,16 +2298,16 @@ discard block |
||
2298 | 2298 | } |
2299 | 2299 | |
2300 | 2300 | if (in_array($key_type, array('date'))) { |
2301 | - $dateparamname_start = $keysuffix . 'options_' . $key . $keyprefix . '_start'; |
|
2302 | - $dateparamname_end = $keysuffix . 'options_' . $key . $keyprefix . '_end'; |
|
2303 | - if (GETPOST($dateparamname_start . 'year') || GETPOST($dateparamname_end . 'year')) { |
|
2301 | + $dateparamname_start = $keysuffix.'options_'.$key.$keyprefix.'_start'; |
|
2302 | + $dateparamname_end = $keysuffix.'options_'.$key.$keyprefix.'_end'; |
|
2303 | + if (GETPOST($dateparamname_start.'year') || GETPOST($dateparamname_end.'year')) { |
|
2304 | 2304 | $value_key = array(); |
2305 | 2305 | // values provided as a component year, month, day, etc. |
2306 | - if (GETPOST($dateparamname_start . 'year')) { |
|
2307 | - $value_key['start'] = dol_mktime(0, 0, 0, GETPOSTINT($dateparamname_start . 'month'), GETPOSTINT($dateparamname_start . 'day'), GETPOSTINT($dateparamname_start . 'year')); |
|
2306 | + if (GETPOST($dateparamname_start.'year')) { |
|
2307 | + $value_key['start'] = dol_mktime(0, 0, 0, GETPOSTINT($dateparamname_start.'month'), GETPOSTINT($dateparamname_start.'day'), GETPOSTINT($dateparamname_start.'year')); |
|
2308 | 2308 | } |
2309 | - if (GETPOST($dateparamname_start . 'year')) { |
|
2310 | - $value_key['end'] = dol_mktime(23, 59, 59, GETPOSTINT($dateparamname_end . 'month'), GETPOSTINT($dateparamname_end . 'day'), GETPOSTINT($dateparamname_end . 'year')); |
|
2309 | + if (GETPOST($dateparamname_start.'year')) { |
|
2310 | + $value_key['end'] = dol_mktime(23, 59, 59, GETPOSTINT($dateparamname_end.'month'), GETPOSTINT($dateparamname_end.'day'), GETPOSTINT($dateparamname_end.'year')); |
|
2311 | 2311 | } |
2312 | 2312 | } elseif (GETPOST($keysuffix."options_".$key.$keyprefix."year")) { |
2313 | 2313 | // Clean parameters |
@@ -2316,22 +2316,22 @@ discard block |
||
2316 | 2316 | continue; // Value was not provided, we should not set it. |
2317 | 2317 | } |
2318 | 2318 | } elseif (in_array($key_type, array('datetime', 'datetimegmt'))) { |
2319 | - $dateparamname_start = $keysuffix . 'options_' . $key . $keyprefix . '_start'; |
|
2320 | - $dateparamname_end = $keysuffix . 'options_' . $key . $keyprefix . '_end'; |
|
2321 | - if (GETPOST($dateparamname_start . 'year') && GETPOST($dateparamname_end . 'year')) { |
|
2319 | + $dateparamname_start = $keysuffix.'options_'.$key.$keyprefix.'_start'; |
|
2320 | + $dateparamname_end = $keysuffix.'options_'.$key.$keyprefix.'_end'; |
|
2321 | + if (GETPOST($dateparamname_start.'year') && GETPOST($dateparamname_end.'year')) { |
|
2322 | 2322 | // values provided as a date pair (start date + end date), each date being broken down as year, month, day, etc. |
2323 | - $dateparamname_end_hour = GETPOSTINT($dateparamname_end . 'hour') != '-1' ? GETPOSTINT($dateparamname_end . 'hour') : '23'; |
|
2324 | - $dateparamname_end_min = GETPOSTINT($dateparamname_end . 'min') != '-1' ? GETPOSTINT($dateparamname_end . 'min') : '59'; |
|
2325 | - $dateparamname_end_sec = GETPOSTINT($dateparamname_end . 'sec') != '-1' ? GETPOSTINT($dateparamname_end . 'sec') : '59'; |
|
2323 | + $dateparamname_end_hour = GETPOSTINT($dateparamname_end.'hour') != '-1' ? GETPOSTINT($dateparamname_end.'hour') : '23'; |
|
2324 | + $dateparamname_end_min = GETPOSTINT($dateparamname_end.'min') != '-1' ? GETPOSTINT($dateparamname_end.'min') : '59'; |
|
2325 | + $dateparamname_end_sec = GETPOSTINT($dateparamname_end.'sec') != '-1' ? GETPOSTINT($dateparamname_end.'sec') : '59'; |
|
2326 | 2326 | if ($key_type == 'datetimegmt') { |
2327 | 2327 | $value_key = array( |
2328 | - 'start' => dol_mktime(GETPOSTINT($dateparamname_start . 'hour'), GETPOSTINT($dateparamname_start . 'min'), GETPOSTINT($dateparamname_start . 'sec'), GETPOSTINT($dateparamname_start . 'month'), GETPOSTINT($dateparamname_start . 'day'), GETPOSTINT($dateparamname_start . 'year'), 'gmt'), |
|
2329 | - 'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end . 'month'), GETPOSTINT($dateparamname_end . 'day'), GETPOSTINT($dateparamname_end . 'year'), 'gmt') |
|
2328 | + 'start' => dol_mktime(GETPOSTINT($dateparamname_start.'hour'), GETPOSTINT($dateparamname_start.'min'), GETPOSTINT($dateparamname_start.'sec'), GETPOSTINT($dateparamname_start.'month'), GETPOSTINT($dateparamname_start.'day'), GETPOSTINT($dateparamname_start.'year'), 'gmt'), |
|
2329 | + 'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end.'month'), GETPOSTINT($dateparamname_end.'day'), GETPOSTINT($dateparamname_end.'year'), 'gmt') |
|
2330 | 2330 | ); |
2331 | 2331 | } else { |
2332 | 2332 | $value_key = array( |
2333 | - 'start' => dol_mktime(GETPOSTINT($dateparamname_start . 'hour'), GETPOSTINT($dateparamname_start . 'min'), GETPOSTINT($dateparamname_start . 'sec'), GETPOSTINT($dateparamname_start . 'month'), GETPOSTINT($dateparamname_start . 'day'), GETPOSTINT($dateparamname_start . 'year'), 'tzuserrel'), |
|
2334 | - 'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end . 'month'), GETPOSTINT($dateparamname_end . 'day'), GETPOSTINT($dateparamname_end . 'year'), 'tzuserrel') |
|
2333 | + 'start' => dol_mktime(GETPOSTINT($dateparamname_start.'hour'), GETPOSTINT($dateparamname_start.'min'), GETPOSTINT($dateparamname_start.'sec'), GETPOSTINT($dateparamname_start.'month'), GETPOSTINT($dateparamname_start.'day'), GETPOSTINT($dateparamname_start.'year'), 'tzuserrel'), |
|
2334 | + 'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end.'month'), GETPOSTINT($dateparamname_end.'day'), GETPOSTINT($dateparamname_end.'year'), 'tzuserrel') |
|
2335 | 2335 | ); |
2336 | 2336 | } |
2337 | 2337 | } elseif (GETPOST($keysuffix."options_".$key.$keyprefix."year")) { |
@@ -164,8 +164,8 @@ discard block |
||
164 | 164 | public $posxlabel; |
165 | 165 | public $posxup; |
166 | 166 | public $posxref; |
167 | - public $posxpicture; // For picture |
|
168 | - public $posxdesc; // For description |
|
167 | + public $posxpicture; // For picture |
|
168 | + public $posxdesc; // For description |
|
169 | 169 | public $posxqty; |
170 | 170 | public $posxpuht; |
171 | 171 | public $posxtva; |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | // phpcs:enable |
205 | 205 | global $conf, $extrafields; |
206 | 206 | |
207 | - $logotouse = $conf->user->dir_output . '/' . get_exdir(0, 0, 0, 0, $user, 'user') . 'photos/' . getImageFileNameForSize($user->photo, '_small'); |
|
207 | + $logotouse = $conf->user->dir_output.'/'.get_exdir(0, 0, 0, 0, $user, 'user').'photos/'.getImageFileNameForSize($user->photo, '_small'); |
|
208 | 208 | |
209 | 209 | $array_user = array( |
210 | 210 | 'myuser_lastname' => $user->lastname, |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | 'myuser_email' => $user->email, |
225 | 225 | 'myuser_logo' => $logotouse, |
226 | 226 | 'myuser_job' => $user->job, |
227 | - 'myuser_web' => '', // url not exist in $user object |
|
227 | + 'myuser_web' => '', // url not exist in $user object |
|
228 | 228 | 'myuser_birth' => dol_print_date($user->birth, 'day', 'gmt'), |
229 | 229 | 'myuser_dateemployment' => dol_print_date($user->dateemployment, 'day', 'tzuser'), |
230 | 230 | 'myuser_dateemploymentend' => dol_print_date($user->dateemploymentend, 'day', 'tzuser'), |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | |
542 | 542 | if (get_class($object) == 'CommandeFournisseur') { |
543 | 543 | /** @var CommandeFournisseur $object*/ |
544 | - $object->date_validation = $object->date_valid; |
|
544 | + $object->date_validation = $object->date_valid; |
|
545 | 545 | $object->date_commande = $object->date; |
546 | 546 | } |
547 | 547 | $resarray = array( |
@@ -1488,7 +1488,7 @@ discard block |
||
1488 | 1488 | |
1489 | 1489 | if (!empty($fields)) { |
1490 | 1490 | // Sort extrafields by rank |
1491 | - uasort($fields, function ($a, $b) { |
|
1491 | + uasort($fields, function($a, $b) { |
|
1492 | 1492 | return ($a->rank > $b->rank) ? 1 : -1; |
1493 | 1493 | }); |
1494 | 1494 |
@@ -1458,7 +1458,7 @@ discard block |
||
1458 | 1458 | |
1459 | 1459 | $sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def"; |
1460 | 1460 | $sql .= " WHERE file = '".$this->db->escape($file)."'"; |
1461 | - $sql .= " AND entity = ".$conf->entity; // Do not use getEntity here, we want to delete only in current company |
|
1461 | + $sql .= " AND entity = ".$conf->entity; // Do not use getEntity here, we want to delete only in current company |
|
1462 | 1462 | |
1463 | 1463 | dol_syslog(get_class($this)."::delete_boxes", LOG_DEBUG); |
1464 | 1464 | $resql = $this->db->query($sql); |
@@ -1870,7 +1870,7 @@ discard block |
||
1870 | 1870 | |
1871 | 1871 | // If the module is active |
1872 | 1872 | foreach ($this->rights as $key => $value) { |
1873 | - $r_id = $this->rights[$key][0]; // permission id in llx_rights_def (not unique because primary key is couple id-entity) |
|
1873 | + $r_id = $this->rights[$key][0]; // permission id in llx_rights_def (not unique because primary key is couple id-entity) |
|
1874 | 1874 | $r_desc = $this->rights[$key][1]; |
1875 | 1875 | $r_type = isset($this->rights[$key][2]) ? $this->rights[$key][2] : ''; |
1876 | 1876 | $r_def = empty($this->rights[$key][3]) ? 0 : $this->rights[$key][3]; |
@@ -2491,36 +2491,36 @@ discard block |
||
2491 | 2491 | } |
2492 | 2492 | |
2493 | 2493 | if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) { |
2494 | - $versionTitle = $langs->trans("Version").' '.$this->getVersion(1); |
|
2494 | + $versionTitle = $langs->trans("Version").' '.$this->getVersion(1); |
|
2495 | 2495 | if ($this->needUpdate) { |
2496 | 2496 | $versionTitle .= '<br>'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion; |
2497 | 2497 | } |
2498 | 2498 | |
2499 | - $return .= '<span class="info-box-icon-version'.($versiontrans ? ' '.$versiontrans : '').' classfortooltip" title="'.dol_escape_js($versionTitle).'" >'; |
|
2500 | - $return .= $this->getVersion(1); |
|
2501 | - $return .= '</span>'; |
|
2499 | + $return .= '<span class="info-box-icon-version'.($versiontrans ? ' '.$versiontrans : '').' classfortooltip" title="'.dol_escape_js($versionTitle).'" >'; |
|
2500 | + $return .= $this->getVersion(1); |
|
2501 | + $return .= '</span>'; |
|
2502 | 2502 | } |
2503 | 2503 | |
2504 | - $return .= '</div> |
|
2504 | + $return .= '</div> |
|
2505 | 2505 | <div class="info-box-content info-box-text-module'.(!getDolGlobalString($const_name) ? '' : ' info-box-module-enabled'.($versiontrans ? ' info-box-content-warning' : '')).'"> |
2506 | 2506 | <span class="info-box-title">'.$this->getName().'</span> |
2507 | 2507 | <span class="info-box-desc twolinesmax opacitymedium" title="'.dol_escape_htmltag($this->getDesc()).'">'.nl2br($this->getDesc()).'</span>'; |
2508 | 2508 | |
2509 | - $return .= '<div class="valignmiddle inline-block info-box-more">'; |
|
2509 | + $return .= '<div class="valignmiddle inline-block info-box-more">'; |
|
2510 | 2510 | //if ($versiontrans) print img_warning($langs->trans("Version").' '.$this->getVersion(1)).' '; |
2511 | - $return .= '<a class="valignmiddle inline-block" href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.((int) $this->numero).'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto(($this->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo).'</a>'; |
|
2512 | - $return .= '</div><br>'; |
|
2513 | - |
|
2514 | - $return .= '<div class="valignmiddle inline-block info-box-actions">'; |
|
2515 | - $return .= '<div class="valignmiddle inline-block info-box-setup">'; |
|
2516 | - $return .= $codetoconfig; |
|
2517 | - $return .= '</div>'; |
|
2518 | - $return .= '<div class="valignmiddle inline-block marginleftonly marginrightonly">'; |
|
2519 | - $return .= $codeenabledisable; |
|
2520 | - $return .= '</div>'; |
|
2521 | - $return .= '</div>'; |
|
2522 | - |
|
2523 | - $return .= ' |
|
2511 | + $return .= '<a class="valignmiddle inline-block" href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.((int) $this->numero).'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto(($this->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo).'</a>'; |
|
2512 | + $return .= '</div><br>'; |
|
2513 | + |
|
2514 | + $return .= '<div class="valignmiddle inline-block info-box-actions">'; |
|
2515 | + $return .= '<div class="valignmiddle inline-block info-box-setup">'; |
|
2516 | + $return .= $codetoconfig; |
|
2517 | + $return .= '</div>'; |
|
2518 | + $return .= '<div class="valignmiddle inline-block marginleftonly marginrightonly">'; |
|
2519 | + $return .= $codeenabledisable; |
|
2520 | + $return .= '</div>'; |
|
2521 | + $return .= '</div>'; |
|
2522 | + |
|
2523 | + $return .= ' |
|
2524 | 2524 | </div><!-- /.info-box-content --> |
2525 | 2525 | </div><!-- /.info-box --> |
2526 | 2526 | </div>'; |
@@ -2539,7 +2539,7 @@ discard block |
||
2539 | 2539 | { |
2540 | 2540 | require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; |
2541 | 2541 | if (!empty($this->url_last_version)) { |
2542 | - $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only |
|
2542 | + $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only |
|
2543 | 2543 | if (isset($lastVersion['content']) && strlen($lastVersion['content']) < 30) { |
2544 | 2544 | // Security warning : be careful with remote data content, the module editor could be hacked (or evil) so limit to a-z A-Z 0-9 _ . - |
2545 | 2545 | $this->lastVersion = preg_replace("/[^a-zA-Z0-9_\.\-]+/", "", $lastVersion['content']); |
@@ -82,12 +82,12 @@ discard block |
||
82 | 82 | 'bom' => 'Bom', |
83 | 83 | 'bookcal' => 'BookCal', |
84 | 84 | 'bookmark' => 'Bookmark', |
85 | - 'cashdesk' => null, // TODO: fill in proper class |
|
85 | + 'cashdesk' => null, // TODO: fill in proper class |
|
86 | 86 | 'category' => 'Categorie', |
87 | 87 | 'clicktodial' => 'ClickToDial', |
88 | 88 | 'collab' => 'Collab', |
89 | 89 | 'comptabilite' => 'Comptabilite', |
90 | - 'contact' => null, // TODO: fill in proper class |
|
90 | + 'contact' => null, // TODO: fill in proper class |
|
91 | 91 | 'contract' => 'Contrat', |
92 | 92 | 'cron' => 'Cron', |
93 | 93 | 'datapolicy' => 'DataPolicy', |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | 'don' => 'Don', |
100 | 100 | 'dynamicprices' => 'DynamicPrices', |
101 | 101 | 'ecm' => 'ECM', |
102 | - 'ecotax' => null, // TODO: External module ? |
|
102 | + 'ecotax' => null, // TODO: External module ? |
|
103 | 103 | 'emailcollector' => 'EmailCollector', |
104 | 104 | 'eventorganization' => 'EventOrganization', |
105 | 105 | 'expensereport' => 'ExpenseReport', |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | 'fournisseur' => 'Fournisseur', |
111 | 111 | 'ftp' => 'FTP', |
112 | 112 | 'geoipmaxmind' => 'GeoIPMaxmind', |
113 | - 'google' => null, // External ? |
|
113 | + 'google' => null, // External ? |
|
114 | 114 | 'gravatar' => 'Gravatar', |
115 | 115 | 'holiday' => 'Holiday', |
116 | 116 | 'hrm' => 'HRM', |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'ldap' => 'Ldap', |
125 | 125 | 'loan' => 'Loan', |
126 | 126 | 'mailing' => 'Mailing', |
127 | - 'mailman' => null, // Same module as mailmanspip -> MailmanSpip ?? |
|
127 | + 'mailman' => null, // Same module as mailmanspip -> MailmanSpip ?? |
|
128 | 128 | 'mailmanspip' => 'MailmanSpip', |
129 | 129 | 'margin' => 'Margin', |
130 | 130 | 'member' => 'Adherent', |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | 'notification' => 'Notification', |
138 | 138 | 'numberwords' => null, // Not provided by default, no module tests |
139 | 139 | 'oauth' => 'Oauth', |
140 | - 'openstreetmap' => null, // External module? |
|
140 | + 'openstreetmap' => null, // External module? |
|
141 | 141 | 'opensurvey' => 'OpenSurvey', |
142 | 142 | 'order' => 'Commande', |
143 | 143 | 'partnership' => 'Partnership', |
@@ -164,8 +164,8 @@ discard block |
||
164 | 164 | 'stock' => 'Stock', |
165 | 165 | 'stocktransfer' => 'StockTransfer', |
166 | 166 | 'stripe' => 'Stripe', |
167 | - 'supplier_invoice' => null, // Special case, uses invoice |
|
168 | - 'supplier_order' => null, // Special case, uses invoice |
|
167 | + 'supplier_invoice' => null, // Special case, uses invoice |
|
168 | + 'supplier_order' => null, // Special case, uses invoice |
|
169 | 169 | 'supplier_proposal' => 'SupplierProposal', |
170 | 170 | 'syslog' => 'Syslog', |
171 | 171 | 'takepos' => 'TakePos', |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | // 'processes' => 6, |
227 | 227 | 'backward_compatibility_checks' => false, |
228 | 228 | 'simplify_ast' => true, |
229 | - 'analyzed_file_extensions' => ['php','inc'], |
|
229 | + 'analyzed_file_extensions' => ['php', 'inc'], |
|
230 | 230 | 'globals_type_map' => [ |
231 | 231 | 'conf' => '\Conf', |
232 | 232 | 'db' => '\DoliDB', |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | // your application should be included in this list. |
257 | 257 | 'directory_list' => [ |
258 | 258 | 'htdocs', |
259 | - PHAN_DIR . '/stubs/', |
|
259 | + PHAN_DIR.'/stubs/', |
|
260 | 260 | ], |
261 | 261 | |
262 | 262 | // A directory list that defines files that will be excluded |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | "exclude_analysis_directory_list" => [ |
274 | 274 | 'htdocs/includes/', |
275 | 275 | 'htdocs/core/class/lessc.class.php', // External library |
276 | - PHAN_DIR . '/stubs/', |
|
276 | + PHAN_DIR.'/stubs/', |
|
277 | 277 | ], |
278 | 278 | //'exclude_file_regex' => '@^vendor/.*/(tests?|Tests?)/@', |
279 | 279 | 'exclude_file_regex' => '@^(' // @phpstan-ignore-line |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | // Included as stub (did not seem properly analysed by phan without it) |
286 | 286 | .'|htdocs/includes/stripe/.*' // @phpstan-ignore-line |
287 | 287 | // .'|htdocs/[^h].*/.*' // For testing @phpstan-ignore-line |
288 | - .')@', // @phpstan-ignore-line |
|
288 | + .')@', // @phpstan-ignore-line |
|
289 | 289 | |
290 | 290 | // A list of plugin files to execute. |
291 | 291 | // Plugins which are bundled with Phan can be added here by providing their name |
@@ -301,8 +301,8 @@ discard block |
||
301 | 301 | '/^isModEnabled$/' => [0, $moduleNameRegex, 'UnknownModuleName'], |
302 | 302 | // Note: trick to have different key for same regex: |
303 | 303 | '/^isModEnable[d]$/' => [0, $deprecatedModuleNameRegex, "DeprecatedModuleName"], |
304 | - '/^sanitizeVal$/' => [1, $sanitizeRegex,"UnknownSanitizeType"], |
|
305 | - '/^\\\\ExtraFields::addExtraField$/' => [2, $extraFieldTypeRegex,"UnknownExtrafieldTypeBack"], |
|
304 | + '/^sanitizeVal$/' => [1, $sanitizeRegex, "UnknownSanitizeType"], |
|
305 | + '/^\\\\ExtraFields::addExtraField$/' => [2, $extraFieldTypeRegex, "UnknownExtrafieldTypeBack"], |
|
306 | 306 | ], |
307 | 307 | 'plugins' => [ |
308 | 308 | __DIR__.'/plugins/NoVarDumpPlugin.php', |
@@ -376,10 +376,10 @@ discard block |
||
376 | 376 | 'PhanPluginUnknownObjectMethodCall', |
377 | 377 | 'PhanPluginNonBoolInLogicalArith', |
378 | 378 | // Fixers From PHPDocToRealTypesPlugin: |
379 | - 'PhanPluginCanUseParamType', // Fixer - Report/Add types in the function definition (function abc(string $var) (adds string) |
|
380 | - 'PhanPluginCanUseReturnType', // Fixer - Report/Add return types in the function definition (function abc(string $var) (adds string) |
|
381 | - 'PhanPluginCanUseNullableParamType', // Fixer - Report/Add nullable parameter types in the function definition |
|
382 | - 'PhanPluginCanUseNullableReturnType', // Fixer - Report/Add nullable return types in the function definition |
|
379 | + 'PhanPluginCanUseParamType', // Fixer - Report/Add types in the function definition (function abc(string $var) (adds string) |
|
380 | + 'PhanPluginCanUseReturnType', // Fixer - Report/Add return types in the function definition (function abc(string $var) (adds string) |
|
381 | + 'PhanPluginCanUseNullableParamType', // Fixer - Report/Add nullable parameter types in the function definition |
|
382 | + 'PhanPluginCanUseNullableReturnType', // Fixer - Report/Add nullable return types in the function definition |
|
383 | 383 | |
384 | 384 | // 'PhanPluginNotFullyQualifiedFunctionCall', |
385 | 385 | 'PhanPluginConstantVariableScalar', |
@@ -389,8 +389,8 @@ discard block |
||
389 | 389 | // 'PhanPluginNotFullyQualifiedOptimizableFunctionCall', |
390 | 390 | // 'PhanPluginUnknownMethodReturnType', |
391 | 391 | 'PhanPluginUnknownArrayMethodParamType', |
392 | - 'PhanPluginWhitespaceTab', // Dolibarr uses tabs |
|
393 | - 'PhanPluginWhitespaceTrailing', // Should be handled by other tools |
|
392 | + 'PhanPluginWhitespaceTab', // Dolibarr uses tabs |
|
393 | + 'PhanPluginWhitespaceTrailing', // Should be handled by other tools |
|
394 | 394 | // 'PhanPluginCanUsePHP71Void', |
395 | 395 | 'PhanPluginUnknownArrayMethodReturnType', |
396 | 396 | 'PhanTypeMismatchArgumentInternal', |
@@ -587,29 +587,29 @@ discard block |
||
587 | 587 | //'xdebug' => 'vendor/phan/phan/.phan/internal_stubs/xdebug.phan_php', |
588 | 588 | //'memcached' => PHAN_DIR . '/your_internal_stubs_folder_name/memcached.phan_php', |
589 | 589 | //'PDO' => PHAN_DIR . '/stubs/PDO.phan_php', |
590 | - 'brotli' => PHAN_DIR . '/stubs/brotli.phan_php', |
|
591 | - 'curl' => PHAN_DIR . '/stubs/curl.phan_php', |
|
592 | - 'calendar' => PHAN_DIR . '/stubs/calendar.phan_php', |
|
593 | - 'fileinfo' => PHAN_DIR . '/stubs/fileinfo.phan_php', |
|
594 | - 'ftp' => PHAN_DIR . '/stubs/ftp.phan_php', |
|
595 | - 'gd' => PHAN_DIR . '/stubs/gd.phan_php', |
|
596 | - 'geoip' => PHAN_DIR . '/stubs/geoip.phan_php', |
|
597 | - 'imap' => PHAN_DIR . '/stubs/imap.phan_php', |
|
598 | - 'intl' => PHAN_DIR . '/stubs/intl.phan_php', |
|
599 | - 'ldap' => PHAN_DIR . '/stubs/ldap.phan_php', |
|
600 | - 'mcrypt' => PHAN_DIR . '/stubs/mcrypt.phan_php', |
|
601 | - 'memcache' => PHAN_DIR . '/stubs/memcache.phan_php', |
|
602 | - 'mysqli' => PHAN_DIR . '/stubs/mysqli.phan_php', |
|
603 | - 'pdo_cubrid' => PHAN_DIR . '/stubs/pdo_cubrid.phan_php', |
|
604 | - 'pdo_mysql' => PHAN_DIR . '/stubs/pdo_mysql.phan_php', |
|
605 | - 'pdo_pgsql' => PHAN_DIR . '/stubs/pdo_pgsql.phan_php', |
|
606 | - 'pdo_sqlite' => PHAN_DIR . '/stubs/pdo_sqlite.phan_php', |
|
607 | - 'pgsql' => PHAN_DIR . '/stubs/pgsql.phan_php', |
|
608 | - 'session' => PHAN_DIR . '/stubs/session.phan_php', |
|
609 | - 'simplexml' => PHAN_DIR . '/stubs/SimpleXML.phan_php', |
|
610 | - 'soap' => PHAN_DIR . '/stubs/soap.phan_php', |
|
611 | - 'sockets' => PHAN_DIR . '/stubs/sockets.phan_php', |
|
612 | - 'zip' => PHAN_DIR . '/stubs/zip.phan_php', |
|
590 | + 'brotli' => PHAN_DIR.'/stubs/brotli.phan_php', |
|
591 | + 'curl' => PHAN_DIR.'/stubs/curl.phan_php', |
|
592 | + 'calendar' => PHAN_DIR.'/stubs/calendar.phan_php', |
|
593 | + 'fileinfo' => PHAN_DIR.'/stubs/fileinfo.phan_php', |
|
594 | + 'ftp' => PHAN_DIR.'/stubs/ftp.phan_php', |
|
595 | + 'gd' => PHAN_DIR.'/stubs/gd.phan_php', |
|
596 | + 'geoip' => PHAN_DIR.'/stubs/geoip.phan_php', |
|
597 | + 'imap' => PHAN_DIR.'/stubs/imap.phan_php', |
|
598 | + 'intl' => PHAN_DIR.'/stubs/intl.phan_php', |
|
599 | + 'ldap' => PHAN_DIR.'/stubs/ldap.phan_php', |
|
600 | + 'mcrypt' => PHAN_DIR.'/stubs/mcrypt.phan_php', |
|
601 | + 'memcache' => PHAN_DIR.'/stubs/memcache.phan_php', |
|
602 | + 'mysqli' => PHAN_DIR.'/stubs/mysqli.phan_php', |
|
603 | + 'pdo_cubrid' => PHAN_DIR.'/stubs/pdo_cubrid.phan_php', |
|
604 | + 'pdo_mysql' => PHAN_DIR.'/stubs/pdo_mysql.phan_php', |
|
605 | + 'pdo_pgsql' => PHAN_DIR.'/stubs/pdo_pgsql.phan_php', |
|
606 | + 'pdo_sqlite' => PHAN_DIR.'/stubs/pdo_sqlite.phan_php', |
|
607 | + 'pgsql' => PHAN_DIR.'/stubs/pgsql.phan_php', |
|
608 | + 'session' => PHAN_DIR.'/stubs/session.phan_php', |
|
609 | + 'simplexml' => PHAN_DIR.'/stubs/SimpleXML.phan_php', |
|
610 | + 'soap' => PHAN_DIR.'/stubs/soap.phan_php', |
|
611 | + 'sockets' => PHAN_DIR.'/stubs/sockets.phan_php', |
|
612 | + 'zip' => PHAN_DIR.'/stubs/zip.phan_php', |
|
613 | 613 | ], |
614 | 614 | |
615 | 615 | ]; |