@@ -97,8 +97,9 @@ |
||
| 97 | 97 | $main_data_dir = $argv[4]; // override when executing the script in command line |
| 98 | 98 | } |
| 99 | 99 | // In mode 3 the main_url is custom |
| 100 | - if ($force_install_noedit != 3) |
|
| 101 | - $main_url = detect_dolibarr_main_url_root(); |
|
| 100 | + if ($force_install_noedit != 3) { |
|
| 101 | + $main_url = detect_dolibarr_main_url_root(); |
|
| 102 | + } |
|
| 102 | 103 | if (!empty($argv[5])) { |
| 103 | 104 | $main_url = $argv[5]; // override when executing the script in command line |
| 104 | 105 | } |
@@ -316,11 +316,15 @@ |
||
| 316 | 316 | $resql = $this->db->query($sql); |
| 317 | 317 | if ($resql) { |
| 318 | 318 | while ($obj = $this->db->fetch_object($resql)) { |
| 319 | - if (empty($obj->lettering_code)) continue; |
|
| 319 | + if (empty($obj->lettering_code)) { |
|
| 320 | + continue; |
|
| 321 | + } |
|
| 320 | 322 | |
| 321 | 323 | // Remove normal lettering code if set partial lettering |
| 322 | 324 | if ($partial && preg_match('/^[A-Z]+$/', $obj->lettering_code)) { |
| 323 | - if (!empty($obj->bookkeeping_ids)) $ids = array_diff($ids, explode(',', $obj->bookkeeping_ids)); |
|
| 325 | + if (!empty($obj->bookkeeping_ids)) { |
|
| 326 | + $ids = array_diff($ids, explode(',', $obj->bookkeeping_ids)); |
|
| 327 | + } |
|
| 324 | 328 | } elseif (!$partial && preg_match('/^[a-z]+$/', $obj->lettering_code)) { |
| 325 | 329 | // Delete partial lettering code if set normal lettering |
| 326 | 330 | $sql2 = "UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping SET"; |