Completed
Branch develop (30080e)
by
unknown
16:47
created
htdocs/core/tpl/filemanager.tpl.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -206,8 +206,12 @@
 block discarded – undo
206 206
 		$formquestion['website']=array('type'=>'hidden', 'value'=>$website->ref, 'name'=>'website');
207 207
 	}
208 208
 	$param = '';
209
-	if (!empty($sortfield)) $param .= '&sortfield='.urlencode($sortfield);
210
-	if (!empty($sortorder)) $param .= '&sortorder='.urlencode($sortorder);
209
+	if (!empty($sortfield)) {
210
+		$param .= '&sortfield='.urlencode($sortfield);
211
+	}
212
+	if (!empty($sortorder)) {
213
+		$param .= '&sortorder='.urlencode($sortorder);
214
+	}
211 215
 	print $form->formconfirm($_SERVER["PHP_SELF"].($param ? '?'.$param : ''), empty($file) ? $langs->trans('ConfirmImgWebpCreation') : $langs->trans('ConfirmChosenImgWebpCreation'), empty($file) ? $langs->trans('ConfirmGenerateImgWebp') : $langs->trans('ConfirmGenerateChosenImgWebp', basename($file)), 'convertimgwebp', $formquestion, "yes", 1);
212 216
 	$action = 'file_manager';
213 217
 }
Please login to merge, or discard this patch.
htdocs/asset/note.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,10 +55,14 @@
 block discarded – undo
55 55
 $permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php
56 56
 
57 57
 // Security check (enable the most restrictive one)
58
-if ($user->socid > 0) accessforbidden();
58
+if ($user->socid > 0) {
59
+	accessforbidden();
60
+}
59 61
 $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
60 62
 restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
61
-if (!isModEnabled('asset')) accessforbidden();
63
+if (!isModEnabled('asset')) {
64
+	accessforbidden();
65
+}
62 66
 
63 67
 
64 68
 /*
Please login to merge, or discard this patch.
htdocs/asset/model/accountancy_codes.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,11 +57,17 @@
 block discarded – undo
57 57
 $permissiontoadd = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'write')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'write'))); // Used by the include of actions_addupdatedelete.inc.php
58 58
 
59 59
 // Security check (enable the most restrictive one)
60
-if ($user->socid > 0) accessforbidden();
60
+if ($user->socid > 0) {
61
+	accessforbidden();
62
+}
61 63
 $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
62 64
 restrictedArea($user, 'asset', $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
63
-if (!isModEnabled('asset')) accessforbidden();
64
-if (!$permissiontoread) accessforbidden();
65
+if (!isModEnabled('asset')) {
66
+	accessforbidden();
67
+}
68
+if (!$permissiontoread) {
69
+	accessforbidden();
70
+}
65 71
 
66 72
 $result = $assetaccountancycodes->fetchAccountancyCodes(0, $object->id);
67 73
 if ($result < 0) {
Please login to merge, or discard this patch.
htdocs/asset/model/depreciation_options.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,11 +57,17 @@  discard block
 block discarded – undo
57 57
 $permissiontoadd = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'write')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'write'))); // Used by the include of actions_addupdatedelete.inc.php
58 58
 
59 59
 // Security check (enable the most restrictive one)
60
-if ($user->socid > 0) accessforbidden();
60
+if ($user->socid > 0) {
61
+	accessforbidden();
62
+}
61 63
 $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
62 64
 restrictedArea($user, 'asset', $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
63
-if (!isModEnabled('asset')) accessforbidden();
64
-if (!$permissiontoread) accessforbidden();
65
+if (!isModEnabled('asset')) {
66
+	accessforbidden();
67
+}
68
+if (!$permissiontoread) {
69
+	accessforbidden();
70
+}
65 71
 
66 72
 $object->asset_depreciation_options = &$assetdepreciationoptions;
67 73
 $result = $assetdepreciationoptions->fetchDeprecationOptions(0, $object->id);
@@ -105,7 +111,9 @@  discard block
 block discarded – undo
105 111
 
106 112
 	if ($action == "update") {
107 113
 		$result = $assetdepreciationoptions->setDeprecationOptionsFromPost(1);
108
-		if ($result > 0) $result = $assetdepreciationoptions->updateDeprecationOptions($user, 0, $object->id);
114
+		if ($result > 0) {
115
+			$result = $assetdepreciationoptions->updateDeprecationOptions($user, 0, $object->id);
116
+		}
109 117
 		if ($result < 0) {
110 118
 			setEventMessages($assetdepreciationoptions->error, $assetdepreciationoptions->errors, 'errors');
111 119
 			$action = 'edit';
Please login to merge, or discard this patch.
htdocs/asset/model/agenda.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,12 +86,20 @@
 block discarded – undo
86 86
 $permissiontoadd = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'write')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'write'))); // Used by the include of actions_addupdatedelete.inc.php
87 87
 
88 88
 // Security check (enable the most restrictive one)
89
-if ($user->socid > 0) accessforbidden();
90
-if ($user->socid > 0) $socid = $user->socid;
89
+if ($user->socid > 0) {
90
+	accessforbidden();
91
+}
92
+if ($user->socid > 0) {
93
+	$socid = $user->socid;
94
+}
91 95
 $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
92 96
 restrictedArea($user, 'asset', $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
93
-if (!isModEnabled('asset')) accessforbidden();
94
-if (!$permissiontoread) accessforbidden();
97
+if (!isModEnabled('asset')) {
98
+	accessforbidden();
99
+}
100
+if (!$permissiontoread) {
101
+	accessforbidden();
102
+}
95 103
 
96 104
 
97 105
 /*
Please login to merge, or discard this patch.
htdocs/asset/accountancy_codes.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,10 +56,14 @@
 block discarded – undo
56 56
 $permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php
57 57
 
58 58
 // Security check (enable the most restrictive one)
59
-if ($user->socid > 0) accessforbidden();
59
+if ($user->socid > 0) {
60
+	accessforbidden();
61
+}
60 62
 $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
61 63
 restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
62
-if (!isModEnabled('asset')) accessforbidden();
64
+if (!isModEnabled('asset')) {
65
+	accessforbidden();
66
+}
63 67
 
64 68
 $result = $assetaccountancycodes->fetchAccountancyCodes($object->id);
65 69
 if ($result < 0) {
Please login to merge, or discard this patch.
htdocs/asset/depreciation_options.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,11 +56,17 @@  discard block
 block discarded – undo
56 56
 $permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php
57 57
 
58 58
 // Security check (enable the most restrictive one)
59
-if ($user->socid > 0) accessforbidden();
59
+if ($user->socid > 0) {
60
+	accessforbidden();
61
+}
60 62
 $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
61 63
 restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
62
-if (!isModEnabled('asset')) accessforbidden();
63
-if (!empty($object->not_depreciated)) accessforbidden();
64
+if (!isModEnabled('asset')) {
65
+	accessforbidden();
66
+}
67
+if (!empty($object->not_depreciated)) {
68
+	accessforbidden();
69
+}
64 70
 
65 71
 $object->asset_depreciation_options = &$assetdepreciationoptions;
66 72
 $result = $assetdepreciationoptions->fetchDeprecationOptions($object->id);
@@ -105,7 +111,9 @@  discard block
 block discarded – undo
105 111
 
106 112
 	if ($action == "update") {
107 113
 		$result = $assetdepreciationoptions->setDeprecationOptionsFromPost();
108
-		if ($result > 0) $result = $assetdepreciationoptions->updateDeprecationOptions($user, $object->id);
114
+		if ($result > 0) {
115
+			$result = $assetdepreciationoptions->updateDeprecationOptions($user, $object->id);
116
+		}
109 117
 		if ($result < 0) {
110 118
 			setEventMessages($assetdepreciationoptions->error, $assetdepreciationoptions->errors, 'errors');
111 119
 			$action = 'edit';
Please login to merge, or discard this patch.
htdocs/asset/disposal.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,11 +55,17 @@
 block discarded – undo
55 55
 $permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php
56 56
 
57 57
 // Security check (enable the most restrictive one)
58
-if ($user->socid > 0) accessforbidden();
58
+if ($user->socid > 0) {
59
+	accessforbidden();
60
+}
59 61
 $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
60 62
 restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
61
-if (!isModEnabled('asset')) accessforbidden();
62
-if (!isset($object->disposal_date) || $object->disposal_date === "") accessforbidden();
63
+if (!isModEnabled('asset')) {
64
+	accessforbidden();
65
+}
66
+if (!isset($object->disposal_date) || $object->disposal_date === "") {
67
+	accessforbidden();
68
+}
63 69
 
64 70
 
65 71
 /*
Please login to merge, or discard this patch.
htdocs/categories/viewcat.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1294,7 +1294,9 @@
 block discarded – undo
1294 1294
 				$i = 0;
1295 1295
 				foreach ($tickets as $ticket) {
1296 1296
 					$i++;
1297
-					if ($i > $limit) break;
1297
+					if ($i > $limit) {
1298
+						break;
1299
+					}
1298 1300
 
1299 1301
 					print "\t".'<tr class="oddeven">'."\n";
1300 1302
 					print '<td class="nowrap tdtop">';
Please login to merge, or discard this patch.