@@ -1615,7 +1615,9 @@ |
||
| 1615 | 1615 | global $conf, $langs; |
| 1616 | 1616 | |
| 1617 | 1617 | $ltrdirection = 'L'; |
| 1618 | - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; |
|
| 1618 | + if ($outputlangs->trans("DIRECTION") == 'rtl') { |
|
| 1619 | + $ltrdirection = 'R'; |
|
| 1620 | + } |
|
| 1619 | 1621 | |
| 1620 | 1622 | // Load traductions files required by page |
| 1621 | 1623 | $outputlangs->loadLangs(array("main", "bills", "propal", "companies")); |
@@ -1120,7 +1120,9 @@ |
||
| 1120 | 1120 | global $langs, $conf, $mysoc; |
| 1121 | 1121 | |
| 1122 | 1122 | $ltrdirection = 'L'; |
| 1123 | - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; |
|
| 1123 | + if ($outputlangs->trans("DIRECTION") == 'rtl') { |
|
| 1124 | + $ltrdirection = 'R'; |
|
| 1125 | + } |
|
| 1124 | 1126 | |
| 1125 | 1127 | // Load translation files required by the page |
| 1126 | 1128 | $outputlangs->loadLangs(array("main", "orders", "companies", "bills", "sendings")); |
@@ -436,8 +436,12 @@ discard block |
||
| 436 | 436 | $tmpuser->fetch($object->user_author_id); |
| 437 | 437 | |
| 438 | 438 | $creator_info = $langs->trans("CaseFollowedBy").' '.$tmpuser->getFullName($langs); |
| 439 | - if ($tmpuser->email) $creator_info .= ', '.$langs->trans("EMail").': '.$tmpuser->email; |
|
| 440 | - if ($tmpuser->office_phone) $creator_info .= ', '.$langs->trans("Phone").': '.$tmpuser->office_phone; |
|
| 439 | + if ($tmpuser->email) { |
|
| 440 | + $creator_info .= ', '.$langs->trans("EMail").': '.$tmpuser->email; |
|
| 441 | + } |
|
| 442 | + if ($tmpuser->office_phone) { |
|
| 443 | + $creator_info .= ', '.$langs->trans("Phone").': '.$tmpuser->office_phone; |
|
| 444 | + } |
|
| 441 | 445 | |
| 442 | 446 | $notetoshow = dol_concatdesc($notetoshow, $creator_info); |
| 443 | 447 | } |
@@ -1519,7 +1523,9 @@ discard block |
||
| 1519 | 1523 | global $conf, $langs; |
| 1520 | 1524 | |
| 1521 | 1525 | $ltrdirection = 'L'; |
| 1522 | - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; |
|
| 1526 | + if ($outputlangs->trans("DIRECTION") == 'rtl') { |
|
| 1527 | + $ltrdirection = 'R'; |
|
| 1528 | + } |
|
| 1523 | 1529 | |
| 1524 | 1530 | // Load traductions files required by page |
| 1525 | 1531 | $outputlangs->loadLangs(array("main", "propal", "companies", "bills")); |
@@ -113,8 +113,10 @@ |
||
| 113 | 113 | $search_all = GETPOST("search_all", 'alpha'); |
| 114 | 114 | $search = array(); |
| 115 | 115 | foreach ($object->fields as $key => $val) { |
| 116 | - if (GETPOST('search_'.$key, 'alpha') !== '') $search[$key] = GETPOST('search_'.$key, 'alpha'); |
|
| 117 | -} |
|
| 116 | + if (GETPOST('search_'.$key, 'alpha') !== '') { |
|
| 117 | + $search[$key] = GETPOST('search_'.$key, 'alpha'); |
|
| 118 | + } |
|
| 119 | + } |
|
| 118 | 120 | |
| 119 | 121 | // List of fields to search into when doing a "search in all" |
| 120 | 122 | $fieldstosearchall = array(); |
@@ -81,7 +81,9 @@ discard block |
||
| 81 | 81 | $sql .= " AND f.fk_soc = ".((int) $socid); |
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | - if ($draftonly) $sql .= " AND f.fk_statut = 0"; |
|
| 84 | + if ($draftonly) { |
|
| 85 | + $sql .= " AND f.fk_statut = 0"; |
|
| 86 | + } |
|
| 85 | 87 | |
| 86 | 88 | dol_syslog(get_class($this)."::select_intervention", LOG_DEBUG); |
| 87 | 89 | $resql = $this->db->query($sql); |
@@ -89,8 +91,11 @@ discard block |
||
| 89 | 91 | $out .= '<select id="interventionid" class="flat" name="'.dol_escape_htmltag($htmlname).'">'; |
| 90 | 92 | if ($showempty) { |
| 91 | 93 | $out .= '<option value="0">'; |
| 92 | - if (!is_numeric($showempty)) $out .= $showempty; |
|
| 93 | - else $out .= ' '; |
|
| 94 | + if (!is_numeric($showempty)) { |
|
| 95 | + $out .= $showempty; |
|
| 96 | + } else { |
|
| 97 | + $out .= ' '; |
|
| 98 | + } |
|
| 94 | 99 | $out .= '</option>'; |
| 95 | 100 | } |
| 96 | 101 | $num = $this->db->num_rows($resql); |
@@ -143,8 +143,13 @@ |
||
| 143 | 143 | $date = dol_now(); |
| 144 | 144 | $yymm = strftime("%y%m", $date); |
| 145 | 145 | |
| 146 | - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is |
|
| 147 | - else $num = sprintf("%04s", $max + 1); |
|
| 146 | + if ($max >= (pow(10, 4) - 1)) { |
|
| 147 | + $num = $max + 1; |
|
| 148 | + } |
|
| 149 | + // If counter > 9999, we do not format on 4 chars, we take number as it is |
|
| 150 | + else { |
|
| 151 | + $num = sprintf("%04s", $max + 1); |
|
| 152 | + } |
|
| 148 | 153 | |
| 149 | 154 | dol_syslog("mod_sn_standard::getNextValue return ".$this->prefix.$yymm."-".$num); |
| 150 | 155 | return $this->prefix.$yymm."-".$num; |
@@ -143,8 +143,13 @@ |
||
| 143 | 143 | $date = dol_now(); |
| 144 | 144 | $yymm = strftime("%y%m", $date); |
| 145 | 145 | |
| 146 | - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is |
|
| 147 | - else $num = sprintf("%04s", $max + 1); |
|
| 146 | + if ($max >= (pow(10, 4) - 1)) { |
|
| 147 | + $num = $max + 1; |
|
| 148 | + } |
|
| 149 | + // If counter > 9999, we do not format on 4 chars, we take number as it is |
|
| 150 | + else { |
|
| 151 | + $num = sprintf("%04s", $max + 1); |
|
| 152 | + } |
|
| 148 | 153 | |
| 149 | 154 | dol_syslog("mod_lot_standard::getNextValue return ".$this->prefix.$yymm."-".$num); |
| 150 | 155 | return $this->prefix.$yymm."-".$num; |
@@ -51,7 +51,9 @@ |
||
| 51 | 51 | $object->fetch($id); |
| 52 | 52 | $object->fetch_thirdparty(); |
| 53 | 53 | $result = $object->add_object_linked($addlink, $objecttmp->id); |
| 54 | - if (isset($_POST['reftolinkto'])) unset($_POST['reftolinkto']); |
|
| 54 | + if (isset($_POST['reftolinkto'])) { |
|
| 55 | + unset($_POST['reftolinkto']); |
|
| 56 | + } |
|
| 55 | 57 | } elseif ($ret < 0) { |
| 56 | 58 | setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); |
| 57 | 59 | } else { |
@@ -75,7 +75,9 @@ |
||
| 75 | 75 | |
| 76 | 76 | $parameters = array(); |
| 77 | 77 | $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
| 78 | -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 78 | +if ($reshook < 0) { |
|
| 79 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 80 | +} |
|
| 79 | 81 | |
| 80 | 82 | if (empty($reshook)) { |
| 81 | 83 | $backurlforlist = DOL_URL_ROOT.'/compta/bank/list.php'; |