Passed
Branch develop (66e4de)
by Laurent
33:03
created
htdocs/ticket/tpl/linkedobjectblock.tpl.php 1 patch
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,11 +43,16 @@
 block discarded – undo
43 43
 	$ilink++;
44 44
 
45 45
 	$trclass = 'oddeven';
46
-	if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total';
46
+	if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) {
47
+		$trclass .= ' liste_sub_total';
48
+	}
47 49
 	?>
48 50
     <tr class="<?php echo $trclass; ?>" >
49 51
         <td class="linkedcol-element" ><?php echo $langs->trans("Ticket"); ?>
50
-        <?php if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines"  data-element="'.$objectlink->element.'"  data-id="'.$objectlink->id.'"  > <i class="fa fa-indent"></i> </a'; ?>
52
+        <?php if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) {
53
+	print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines"  data-element="'.$objectlink->element.'"  data-id="'.$objectlink->id.'"  > <i class="fa fa-indent"></i> </a';
54
+}
55
+?>
51 56
         </td>
52 57
         <td class="linkedcol-name nowraponall" ><?php echo $objectlink->getNomUrl(1); ?></td>
53 58
     	<td class="linkedcol-ref center"><?php echo $objectlink->ref_client; ?></td>
Please login to merge, or discard this patch.
htdocs/zapier/hook_note.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,9 @@
 block discarded – undo
53 53
 
54 54
 // Load object
55 55
 include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once  // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
56
-if ($id > 0 || !empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$object->entity]."/".$object->id;
56
+if ($id > 0 || !empty($ref)) {
57
+	$upload_dir = $conf->mymodule->multidir_output[$object->entity]."/".$object->id;
58
+}
57 59
 
58 60
 $permissionnote = 1;
59 61
 //$permissionnote=$user->rights->mymodule->creer;	// Used by the include of actions_setnotes.inc.php
Please login to merge, or discard this patch.
htdocs/product/stock/info.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,9 @@
 block discarded – undo
60 60
 $morehtmlref .= '</div>';
61 61
 
62 62
 $shownav = 1;
63
-if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0;
63
+if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
64
+	$shownav = 0;
65
+}
64 66
 
65 67
 dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', 'ref', $morehtmlref);
66 68
 
Please login to merge, or discard this patch.
htdocs/reception/note.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,9 @@
 block discarded – undo
48 48
 
49 49
 // Security check
50 50
 $socid = '';
51
-if ($user->socid) $socid = $user->socid;
51
+if ($user->socid) {
52
+	$socid = $user->socid;
53
+}
52 54
 $result = restrictedArea($user, $origin, $origin_id);
53 55
 
54 56
 $object = new Reception($db);
Please login to merge, or discard this patch.
htdocs/mrp/lib/mrp_mo.lib.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,11 +55,17 @@  discard block
 block discarded – undo
55 55
 	if (isset($object->fields['note_public']) || isset($object->fields['note_private']))
56 56
 	{
57 57
 		$nbNote = 0;
58
-		if (!empty($object->note_private)) $nbNote++;
59
-		if (!empty($object->note_public)) $nbNote++;
58
+		if (!empty($object->note_private)) {
59
+			$nbNote++;
60
+		}
61
+		if (!empty($object->note_public)) {
62
+			$nbNote++;
63
+		}
60 64
 		$head[$h][0] = dol_buildpath('/mrp/mo_note.php', 1).'?id='.$object->id;
61 65
 		$head[$h][1] = $langs->trans('Notes');
62
-		if ($nbNote > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
66
+		if ($nbNote > 0) {
67
+			$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
68
+		}
63 69
 		$head[$h][2] = 'note';
64 70
 		$h++;
65 71
 	}
@@ -71,7 +77,9 @@  discard block
 block discarded – undo
71 77
 	$nbLinks = Link::count($db, $object->element, $object->id);
72 78
 	$head[$h][0] = dol_buildpath("/mrp/mo_document.php", 1).'?id='.$object->id;
73 79
 	$head[$h][1] = $langs->trans('Documents');
74
-	if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
80
+	if (($nbFiles + $nbLinks) > 0) {
81
+		$head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
82
+	}
75 83
 	$head[$h][2] = 'document';
76 84
 	$h++;
77 85
 
Please login to merge, or discard this patch.
htdocs/takepos/css/pos.css.php 1 patch
Braces   +27 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,14 +27,27 @@  discard block
 block discarded – undo
27 27
 
28 28
 //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');	// Not disabled because need to load personalized language
29 29
 //if (! defined('NOREQUIREDB'))   define('NOREQUIREDB','1');	// Not disabled to increase speed. Language code is found on url.
30
-if (!defined('NOREQUIRESOC'))    define('NOREQUIRESOC', '1');
30
+if (!defined('NOREQUIRESOC')) {
31
+	define('NOREQUIRESOC', '1');
32
+}
31 33
 //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');	// Not disabled because need to do translations
32
-if (!defined('NOCSRFCHECK'))     define('NOCSRFCHECK', 1);
33
-if (!defined('NOTOKENRENEWAL'))  define('NOTOKENRENEWAL', 1);
34
-if (!defined('NOLOGIN'))         define('NOLOGIN', 1); // File must be accessed by logon page so without login
34
+if (!defined('NOCSRFCHECK')) {
35
+	define('NOCSRFCHECK', 1);
36
+}
37
+if (!defined('NOTOKENRENEWAL')) {
38
+	define('NOTOKENRENEWAL', 1);
39
+}
40
+if (!defined('NOLOGIN')) {
41
+	define('NOLOGIN', 1);
42
+}
43
+// File must be accessed by logon page so without login
35 44
 //if (! defined('NOREQUIREMENU'))   define('NOREQUIREMENU',1);  // We need top menu content
36
-if (!defined('NOREQUIREHTML'))   define('NOREQUIREHTML', 1);
37
-if (!defined('NOREQUIREAJAX'))   define('NOREQUIREAJAX', '1');
45
+if (!defined('NOREQUIREHTML')) {
46
+	define('NOREQUIREHTML', 1);
47
+}
48
+if (!defined('NOREQUIREAJAX')) {
49
+	define('NOREQUIREAJAX', '1');
50
+}
38 51
 
39 52
 
40 53
 define('ISLOADEDBYSTEELSHEET', '1');
@@ -48,12 +61,17 @@  discard block
 block discarded – undo
48 61
 // Define css type
49 62
 top_httphead('text/css');
50 63
 // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
51
-if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate');
52
-else header('Cache-Control: no-cache');
64
+if (empty($dolibarr_nocache)) {
65
+	header('Cache-Control: max-age=10800, public, must-revalidate');
66
+} else {
67
+	header('Cache-Control: no-cache');
68
+}
53 69
 
54 70
 
55 71
 require DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
56
-if (defined('THEME_ONLY_CONSTANT')) return;
72
+if (defined('THEME_ONLY_CONSTANT')) {
73
+	return;
74
+}
57 75
 
58 76
 ?>
59 77
 
Please login to merge, or discard this patch.
htdocs/expensereport/class/expensereportstats.class.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,9 @@
 block discarded – undo
83 83
 			$this->where .= " AND e.fk_user_author IN (".(join(',', $childids)).")";
84 84
 		}
85 85
 
86
-		if ($this->userid > 0) $this->where .= ' AND e.fk_user_author = '.$this->userid;
86
+		if ($this->userid > 0) {
87
+			$this->where .= ' AND e.fk_user_author = '.$this->userid;
88
+		}
87 89
 	}
88 90
 
89 91
 
Please login to merge, or discard this patch.
htdocs/fourn/ajax/getSupplierPrices.php 1 patch
Braces   +19 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,10 +22,19 @@  discard block
 block discarded – undo
22 22
  *	\brief      File to return an Ajax response to get list of possible prices for margin calculation
23 23
  */
24 24
 
25
-if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal
26
-if (!defined('NOREQUIREMENU'))  define('NOREQUIREMENU', '1');
27
-if (!defined('NOREQUIREAJAX'))  define('NOREQUIREAJAX', '1');
28
-if (!defined('NOREQUIRESOC'))   define('NOREQUIRESOC', '1');
25
+if (!defined('NOTOKENRENEWAL')) {
26
+	define('NOTOKENRENEWAL', '1');
27
+}
28
+// Disables token renewal
29
+if (!defined('NOREQUIREMENU')) {
30
+	define('NOREQUIREMENU', '1');
31
+}
32
+if (!defined('NOREQUIREAJAX')) {
33
+	define('NOREQUIREAJAX', '1');
34
+}
35
+if (!defined('NOREQUIRESOC')) {
36
+	define('NOREQUIRESOC', '1');
37
+}
29 38
 
30 39
 require '../../main.inc.php';
31 40
 require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
@@ -52,7 +61,9 @@  discard block
 block discarded – undo
52 61
 	$producttmp->fetch($idprod);
53 62
 
54 63
 	$sorttouse = 's.nom, pfp.quantity, pfp.price';
55
-	if (GETPOST('bestpricefirst')) $sorttouse = 'pfp.unitprice, s.nom, pfp.quantity, pfp.price';
64
+	if (GETPOST('bestpricefirst')) {
65
+		$sorttouse = 'pfp.unitprice, s.nom, pfp.quantity, pfp.price';
66
+	}
56 67
 
57 68
 	$productSupplierArray = $producttmp->list_product_fournisseur_price($idprod, $sorttouse); // We list all price per supplier, and then firstly with the lower quantity. So we can choose first one with enough quantity into list.
58 69
 	if (is_array($productSupplierArray))
@@ -78,7 +89,9 @@  discard block
 block discarded – undo
78 89
 			}
79 90
 
80 91
 			$label = price($price, 0, $langs, 0, 0, -1, $conf->currency)."/".$langs->trans("Unit");
81
-			if ($productSupplier->fourn_ref) $label .= ' ('.$productSupplier->fourn_ref.')';
92
+			if ($productSupplier->fourn_ref) {
93
+				$label .= ' ('.$productSupplier->fourn_ref.')';
94
+			}
82 95
 
83 96
 			$prices[] = array("id" => $productSupplier->product_fourn_price_id, "price" => price2num($price, 0, '', 0), "label" => $label, "title" => $title); // For price field, we must use price2num(), for label or title, price()
84 97
 		}
Please login to merge, or discard this patch.
htdocs/variants/ajax/orderAttribute.php 1 patch
Braces   +19 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,12 +16,25 @@
 block discarded – undo
16 16
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 17
  */
18 18
 
19
-if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disable token renewal
20
-if (!defined('NOREQUIREMENU'))  define('NOREQUIREMENU', '1');
21
-if (!defined('NOREQUIREHTML'))  define('NOREQUIREHTML', '1');
22
-if (!defined('NOREQUIREAJAX'))  define('NOREQUIREAJAX', '1');
23
-if (!defined('NOREQUIRESOC'))   define('NOREQUIRESOC', '1');
24
-if (!defined('NOREQUIRETRAN'))  define('NOREQUIRETRAN', '1');
19
+if (!defined('NOTOKENRENEWAL')) {
20
+	define('NOTOKENRENEWAL', '1');
21
+}
22
+// Disable token renewal
23
+if (!defined('NOREQUIREMENU')) {
24
+	define('NOREQUIREMENU', '1');
25
+}
26
+if (!defined('NOREQUIREHTML')) {
27
+	define('NOREQUIREHTML', '1');
28
+}
29
+if (!defined('NOREQUIREAJAX')) {
30
+	define('NOREQUIREAJAX', '1');
31
+}
32
+if (!defined('NOREQUIRESOC')) {
33
+	define('NOREQUIRESOC', '1');
34
+}
35
+if (!defined('NOREQUIRETRAN')) {
36
+	define('NOREQUIRETRAN', '1');
37
+}
25 38
 
26 39
 require '../../main.inc.php';
27 40
 
Please login to merge, or discard this patch.