Completed
Branch develop (f9de28)
by
unknown
18:23
created
htdocs/core/class/html.formsetup.class.php 1 patch
Spacing   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -154,15 +154,15 @@  discard block
 block discarded – undo
154 154
 			return $hookmanager->resPrint;
155 155
 		} else {
156 156
 			$out = '<!-- Start generateOutput from FormSetup class  -->';
157
-			$out.= $this->htmlBeforeOutputForm;
157
+			$out .= $this->htmlBeforeOutputForm;
158 158
 
159 159
 			if ($editMode) {
160
-				$out.= '<form ' . self::generateAttributesStringFromArray($this->formAttributes) . ' >';
160
+				$out .= '<form '.self::generateAttributesStringFromArray($this->formAttributes).' >';
161 161
 
162 162
 				// generate hidden values from $this->formHiddenInputs
163 163
 				if (!empty($this->formHiddenInputs) && is_array($this->formHiddenInputs)) {
164 164
 					foreach ($this->formHiddenInputs as $hiddenKey => $hiddenValue) {
165
-						$out.= '<input type="hidden" name="'.dol_escape_htmltag($hiddenKey).'" value="' . dol_escape_htmltag($hiddenValue) . '">';
165
+						$out .= '<input type="hidden" name="'.dol_escape_htmltag($hiddenKey).'" value="'.dol_escape_htmltag($hiddenValue).'">';
166 166
 					}
167 167
 				}
168 168
 			}
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
 				return $hookmanager->resPrint;
181 181
 			} elseif ($editMode) {
182 182
 				$out .= '<div class="form-setup-button-container center">'; // Todo : remove .center by adding style to form-setup-button-container css class in all themes
183
-				$out.= $this->htmlOutputMoreButton;
184
-				$out .= '<input class="button button-save" type="submit" value="' . $this->langs->trans("Save") . '">'; // Todo fix dolibarr style for <button and use <button instead of input
183
+				$out .= $this->htmlOutputMoreButton;
184
+				$out .= '<input class="button button-save" type="submit" value="'.$this->langs->trans("Save").'">'; // Todo fix dolibarr style for <button and use <button instead of input
185 185
 				/*$out .= ' &nbsp;&nbsp; ';
186 186
 				$out .= '<a class="button button-cancel" type="submit" href="' . $this->formAttributes['action'] . '">'.$this->langs->trans('Cancel').'</a>';
187 187
 				*/
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 				$out .= '</form>';
193 193
 			}
194 194
 
195
-			$out.= $this->htmlAfterOutputForm;
195
+			$out .= $this->htmlAfterOutputForm;
196 196
 
197 197
 			return $out;
198 198
 		}
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
 			if (empty($hideTitle)) {
226 226
 				$out .= '<thead>';
227 227
 				$out .= '<tr class="liste_titre">';
228
-				$out .= '	<td>' . $this->langs->trans("Parameter") . '</td>';
229
-				$out .= '	<td>' . $this->langs->trans("Value") . '</td>';
228
+				$out .= '	<td>'.$this->langs->trans("Parameter").'</td>';
229
+				$out .= '	<td>'.$this->langs->trans("Value").'</td>';
230 230
 				$out .= '</tr>';
231 231
 				$out .= '</thead>';
232 232
 			}
@@ -312,27 +312,27 @@  discard block
 block discarded – undo
312 312
 	public function generateLineOutput($item, $editMode = false)
313 313
 	{
314 314
 		$out = '';
315
-		if ($item->enabled==1) {
315
+		if ($item->enabled == 1) {
316 316
 			$trClass = 'oddeven';
317 317
 			if ($item->getType() == 'title') {
318 318
 				$trClass = 'liste_titre';
319 319
 			}
320 320
 
321 321
 			$this->setupNotEmpty++;
322
-			$out.= '<tr class="'.$trClass.'">';
322
+			$out .= '<tr class="'.$trClass.'">';
323 323
 
324
-			$out.= '<td class="col-setup-title">';
325
-			$out.= '<span id="helplink'.$item->confKey.'" class="spanforparamtooltip">';
326
-			$out.= $this->form->textwithpicto($item->getNameText(), $item->getHelpText(), 1, 'info', '', 0, 3, 'tootips'.$item->confKey);
327
-			$out.= '</span>';
328
-			$out.= '</td>';
324
+			$out .= '<td class="col-setup-title">';
325
+			$out .= '<span id="helplink'.$item->confKey.'" class="spanforparamtooltip">';
326
+			$out .= $this->form->textwithpicto($item->getNameText(), $item->getHelpText(), 1, 'info', '', 0, 3, 'tootips'.$item->confKey);
327
+			$out .= '</span>';
328
+			$out .= '</td>';
329 329
 
330
-			$out.= '<td>';
330
+			$out .= '<td>';
331 331
 
332 332
 			if ($editMode) {
333
-				$out.= $item->generateInputField();
333
+				$out .= $item->generateInputField();
334 334
 			} else {
335
-				$out.= $item->generateOutputField();
335
+				$out .= $item->generateOutputField();
336 336
 			}
337 337
 
338 338
 			if (!empty($item->errors)) {
@@ -340,8 +340,8 @@  discard block
 block discarded – undo
340 340
 				setEventMessages(null, $item->errors, 'errors');
341 341
 			}
342 342
 
343
-			$out.= '</td>';
344
-			$out.= '</tr>';
343
+			$out .= '</td>';
344
+			$out .= '</tr>';
345 345
 		}
346 346
 
347 347
 		return $out;
@@ -812,7 +812,7 @@  discard block
 block discarded – undo
812 812
 		if (!empty($this->helpText)) {
813 813
 			return $this->helpText;
814 814
 		}
815
-		return (($this->langs->trans($this->confKey . 'Tooltip') != $this->confKey . 'Tooltip') ? $this->langs->trans($this->confKey . 'Tooltip') : '');
815
+		return (($this->langs->trans($this->confKey.'Tooltip') != $this->confKey.'Tooltip') ? $this->langs->trans($this->confKey.'Tooltip') : '');
816 816
 	}
817 817
 
818 818
 	/**
@@ -858,47 +858,47 @@  discard block
 block discarded – undo
858 858
 		$out = '';
859 859
 
860 860
 		if ($this->type == 'title') {
861
-			$out.= $this->generateOutputField(); // title have no input
861
+			$out .= $this->generateOutputField(); // title have no input
862 862
 		} elseif ($this->type == 'multiselect') {
863
-			$out.= $this->generateInputFieldMultiSelect();
863
+			$out .= $this->generateInputFieldMultiSelect();
864 864
 		} elseif ($this->type == 'select') {
865
-			$out.= $this->generateInputFieldSelect();
865
+			$out .= $this->generateInputFieldSelect();
866 866
 		} elseif ($this->type == 'selectUser') {
867
-			$out.= $this->generateInputFieldSelectUser();
867
+			$out .= $this->generateInputFieldSelectUser();
868 868
 		} elseif ($this->type == 'textarea') {
869
-			$out.= $this->generateInputFieldTextarea();
870
-		} elseif ($this->type== 'html') {
871
-			$out.= $this->generateInputFieldHtml();
872
-		} elseif ($this->type== 'color') {
873
-			$out.=  $this->generateInputFieldColor();
869
+			$out .= $this->generateInputFieldTextarea();
870
+		} elseif ($this->type == 'html') {
871
+			$out .= $this->generateInputFieldHtml();
872
+		} elseif ($this->type == 'color') {
873
+			$out .= $this->generateInputFieldColor();
874 874
 		} elseif ($this->type == 'yesno') {
875 875
 			if (!empty($conf->use_javascript_ajax)) {
876
-				$out.= ajax_constantonoff($this->confKey);
876
+				$out .= ajax_constantonoff($this->confKey);
877 877
 			} else {
878
-				$out.= $this->form->selectyesno($this->confKey, $this->fieldValue, 1);
878
+				$out .= $this->form->selectyesno($this->confKey, $this->fieldValue, 1);
879 879
 			}
880 880
 		} elseif (preg_match('/emailtemplate:/', $this->type)) {
881
-			$out.= $this->generateInputFieldEmailTemplate();
881
+			$out .= $this->generateInputFieldEmailTemplate();
882 882
 		} elseif (preg_match('/category:/', $this->type)) {
883
-			$out.=$this->generateInputFieldCategories();
883
+			$out .= $this->generateInputFieldCategories();
884 884
 		} elseif (preg_match('/thirdparty_type/', $this->type)) {
885 885
 			require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
886 886
 			$formcompany = new FormCompany($this->db);
887
-			$out.= $formcompany->selectProspectCustomerType($this->fieldValue, $this->confKey);
887
+			$out .= $formcompany->selectProspectCustomerType($this->fieldValue, $this->confKey);
888 888
 		} elseif ($this->type == 'securekey') {
889
-			$out.= $this->generateInputFieldSecureKey();
889
+			$out .= $this->generateInputFieldSecureKey();
890 890
 		} elseif ($this->type == 'product') {
891 891
 			if (isModEnabled("product") || isModEnabled("service")) {
892 892
 				$selected = (empty($this->fieldValue) ? '' : $this->fieldValue);
893
-				$out.= $this->form->select_produits($selected, $this->confKey, '', 0, 0, 1, 2, '', 0, array(), 0, '1', 0, $this->cssClass, 0, '', null, 1);
893
+				$out .= $this->form->select_produits($selected, $this->confKey, '', 0, 0, 1, 2, '', 0, array(), 0, '1', 0, $this->cssClass, 0, '', null, 1);
894 894
 			}
895 895
 		} elseif ($this->type == 'selectBankAccount') {
896 896
 			if (isModEnabled("bank")) {
897 897
 				$selected = (empty($this->fieldValue) ? '' : $this->fieldValue);
898
-				$out.= $this->form->select_comptes($selected, $this->confKey, 0, '', 0, '', 0, '', 1);
898
+				$out .= $this->form->select_comptes($selected, $this->confKey, 0, '', 0, '', 0, '', 1);
899 899
 			}
900 900
 		} else {
901
-			$out.= $this->generateInputFieldText();
901
+			$out .= $this->generateInputFieldText();
902 902
 		}
903 903
 
904 904
 		return $out;
@@ -924,9 +924,9 @@  discard block
 block discarded – undo
924 924
 	 */
925 925
 	public function generateInputFieldTextarea()
926 926
 	{
927
-		$out = '<textarea class="flat" name="'.$this->confKey.'" id="'.$this->confKey.'" cols="50" rows="5" wrap="soft">' . "\n";
928
-		$out.= dol_htmlentities($this->fieldValue);
929
-		$out.= "</textarea>\n";
927
+		$out = '<textarea class="flat" name="'.$this->confKey.'" id="'.$this->confKey.'" cols="50" rows="5" wrap="soft">'."\n";
928
+		$out .= dol_htmlentities($this->fieldValue);
929
+		$out .= "</textarea>\n";
930 930
 		return $out;
931 931
 	}
932 932
 
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
 	public function generateInputFieldHtml()
939 939
 	{
940 940
 		global $conf;
941
-		require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
941
+		require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
942 942
 		$doleditor = new DolEditor($this->confKey, $this->fieldValue, '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%');
943 943
 		return $doleditor->Create(1);
944 944
 	}
@@ -976,7 +976,7 @@  discard block
 block discarded – undo
976 976
 
977 977
 		$out = '';
978 978
 		if (preg_match('/emailtemplate:/', $this->type)) {
979
-			include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
979
+			include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
980 980
 			$formmail = new FormMail($this->db);
981 981
 
982 982
 			$tmp = explode(':', $this->type);
@@ -986,10 +986,10 @@  discard block
 block discarded – undo
986 986
 				foreach ($formmail->lines_model as $modelMail) {
987 987
 					$moreonlabel = '';
988 988
 					if (!empty($arrayOfMessageName[$modelMail->label])) {
989
-						$moreonlabel = ' <span class="opacitymedium">(' . $this->langs->trans("SeveralLangugeVariatFound") . ')</span>';
989
+						$moreonlabel = ' <span class="opacitymedium">('.$this->langs->trans("SeveralLangugeVariatFound").')</span>';
990 990
 					}
991 991
 					// The 'label' is the key that is unique if we exclude the language
992
-					$arrayOfMessageName[$modelMail->id] = $this->langs->trans(preg_replace('/\(|\)/', '', $modelMail->label)) . $moreonlabel;
992
+					$arrayOfMessageName[$modelMail->id] = $this->langs->trans(preg_replace('/\(|\)/', '', $modelMail->label)).$moreonlabel;
993 993
 				}
994 994
 			}
995 995
 			$out .= $this->form->selectarray($this->confKey, $arrayOfMessageName, $this->fieldValue, 'None', 0, 0, '', 0, 0, 0, '', '', 1);
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
 		global $conf;
1010 1010
 		$out = '<input required="required" type="text" class="flat" id="'.$this->confKey.'" name="'.$this->confKey.'" value="'.(GETPOST($this->confKey, 'alpha') ? GETPOST($this->confKey, 'alpha') : $this->fieldValue).'" size="40">';
1011 1011
 		if (!empty($conf->use_javascript_ajax)) {
1012
-			$out.= '&nbsp;'.img_picto($this->langs->trans('Generate'), 'refresh', 'id="generate_token'.$this->confKey.'" class="linkobject"');
1012
+			$out .= '&nbsp;'.img_picto($this->langs->trans('Generate'), 'refresh', 'id="generate_token'.$this->confKey.'" class="linkobject"');
1013 1013
 		}
1014 1014
 
1015 1015
 		// Add button to autosuggest a key
@@ -1124,30 +1124,30 @@  discard block
 block discarded – undo
1124 1124
 		if ($this->type == 'title') {
1125 1125
 			// nothing to do
1126 1126
 		} elseif ($this->type == 'textarea') {
1127
-			$out.= dol_nl2br($this->fieldValue);
1127
+			$out .= dol_nl2br($this->fieldValue);
1128 1128
 		} elseif ($this->type == 'multiselect') {
1129
-			$out.= $this->generateOutputFieldMultiSelect();
1129
+			$out .= $this->generateOutputFieldMultiSelect();
1130 1130
 		} elseif ($this->type == 'select') {
1131
-			$out.= $this->generateOutputFieldSelect();
1131
+			$out .= $this->generateOutputFieldSelect();
1132 1132
 		} elseif ($this->type == 'selectUser') {
1133
-			$out.= $this->generateOutputFieldSelectUser();
1133
+			$out .= $this->generateOutputFieldSelectUser();
1134 1134
 		} elseif ($this->type == 'html') {
1135
-			$out.=  $this->fieldValue;
1135
+			$out .= $this->fieldValue;
1136 1136
 		} elseif ($this->type == 'color') {
1137
-			$out.=  $this->generateOutputFieldColor();
1137
+			$out .= $this->generateOutputFieldColor();
1138 1138
 		} elseif ($this->type == 'yesno') {
1139 1139
 			if (!empty($conf->use_javascript_ajax)) {
1140
-				$out.= ajax_constantonoff($this->confKey);
1140
+				$out .= ajax_constantonoff($this->confKey);
1141 1141
 			} else {
1142 1142
 				if ($this->fieldValue == 1) {
1143
-					$out.= $langs->trans('yes');
1143
+					$out .= $langs->trans('yes');
1144 1144
 				} else {
1145
-					$out.= $langs->trans('no');
1145
+					$out .= $langs->trans('no');
1146 1146
 				}
1147 1147
 			}
1148 1148
 		} elseif (preg_match('/emailtemplate:/', $this->type)) {
1149 1149
 			if ($this->fieldValue > 0) {
1150
-				include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
1150
+				include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
1151 1151
 				$formmail = new FormMail($this->db);
1152 1152
 
1153 1153
 				$tmp = explode(':', $this->type);
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
 				if (is_numeric($template) && $template < 0) {
1157 1157
 					$this->setErrors($formmail->errors);
1158 1158
 				}
1159
-				$out.= $this->langs->trans($template->label);
1159
+				$out .= $this->langs->trans($template->label);
1160 1160
 			}
1161 1161
 		} elseif (preg_match('/category:/', $this->type)) {
1162 1162
 			require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
@@ -1168,18 +1168,18 @@  discard block
 block discarded – undo
1168 1168
 			$ways = $c->print_all_ways(' &gt;&gt; ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
1169 1169
 			$toprint = array();
1170 1170
 			foreach ($ways as $way) {
1171
-				$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . $way . '</li>';
1171
+				$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"'.($c->color ? ' style="background: #'.$c->color.';"' : ' style="background: #bbb"').'>'.$way.'</li>';
1172 1172
 			}
1173
-			$out.='<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>';
1173
+			$out .= '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
1174 1174
 		} elseif (preg_match('/thirdparty_type/', $this->type)) {
1175
-			if ($this->fieldValue==2) {
1176
-				$out.= $this->langs->trans("Prospect");
1177
-			} elseif ($this->fieldValue==3) {
1178
-				$out.= $this->langs->trans("ProspectCustomer");
1179
-			} elseif ($this->fieldValue==1) {
1180
-				$out.= $this->langs->trans("Customer");
1181
-			} elseif ($this->fieldValue==0) {
1182
-				$out.= $this->langs->trans("NorProspectNorCustomer");
1175
+			if ($this->fieldValue == 2) {
1176
+				$out .= $this->langs->trans("Prospect");
1177
+			} elseif ($this->fieldValue == 3) {
1178
+				$out .= $this->langs->trans("ProspectCustomer");
1179
+			} elseif ($this->fieldValue == 1) {
1180
+				$out .= $this->langs->trans("Customer");
1181
+			} elseif ($this->fieldValue == 0) {
1182
+				$out .= $this->langs->trans("NorProspectNorCustomer");
1183 1183
 			}
1184 1184
 		} elseif ($this->type == 'product') {
1185 1185
 			require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@@ -1187,7 +1187,7 @@  discard block
 block discarded – undo
1187 1187
 			$product = new Product($this->db);
1188 1188
 			$resprod = $product->fetch($this->fieldValue);
1189 1189
 			if ($resprod > 0) {
1190
-				$out.= $product->ref;
1190
+				$out .= $product->ref;
1191 1191
 			} elseif ($resprod < 0) {
1192 1192
 				$this->setErrors($product->errors);
1193 1193
 			}
@@ -1197,12 +1197,12 @@  discard block
 block discarded – undo
1197 1197
 			$bankaccount = new Account($this->db);
1198 1198
 			$resbank = $bankaccount->fetch($this->fieldValue);
1199 1199
 			if ($resbank > 0) {
1200
-				$out.= $bankaccount->label;
1200
+				$out .= $bankaccount->label;
1201 1201
 			} elseif ($resbank < 0) {
1202 1202
 				$this->setErrors($bankaccount->errors);
1203 1203
 			}
1204 1204
 		} else {
1205
-			$out.= $this->fieldValue;
1205
+			$out .= $this->fieldValue;
1206 1206
 		}
1207 1207
 
1208 1208
 		return $out;
@@ -1225,7 +1225,7 @@  discard block
 block discarded – undo
1225 1225
 		if (!empty($TSelected)) {
1226 1226
 			foreach ($TSelected as $selected) {
1227 1227
 				if (!empty($this->fieldOptions[$selected])) {
1228
-					$outPut.= dolGetBadge('', $this->fieldOptions[$selected], 'info').' ';
1228
+					$outPut .= dolGetBadge('', $this->fieldOptions[$selected], 'info').' ';
1229 1229
 				}
1230 1230
 			}
1231 1231
 		}
@@ -1240,7 +1240,7 @@  discard block
 block discarded – undo
1240 1240
 	public function generateOutputFieldColor()
1241 1241
 	{
1242 1242
 		global $langs;
1243
-		$this->fieldAttr['disabled']=null;
1243
+		$this->fieldAttr['disabled'] = null;
1244 1244
 		$color = colorArrayToHex(colorStringToArray($this->fieldValue, array()), '');
1245 1245
 		if ($color) {
1246 1246
 			return '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
@@ -1254,7 +1254,7 @@  discard block
 block discarded – undo
1254 1254
 	 */
1255 1255
 	public function generateInputFieldColor()
1256 1256
 	{
1257
-		$this->fieldAttr['type']= 'color';
1257
+		$this->fieldAttr['type'] = 'color';
1258 1258
 		$default = $this->defaultFieldValue;
1259 1259
 		include_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
1260 1260
 		$formother = new FormOther($this->db);
@@ -1286,7 +1286,7 @@  discard block
 block discarded – undo
1286 1286
 		$outPut = '';
1287 1287
 		$user = new User($this->db);
1288 1288
 		$user->fetch($this->fieldValue);
1289
-		$outPut = $user->firstname . " "  . $user->lastname;
1289
+		$outPut = $user->firstname." ".$user->lastname;
1290 1290
 		return $outPut;
1291 1291
 	}
1292 1292
 
Please login to merge, or discard this patch.
htdocs/webportal/admin/setup_theme.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 
25 25
 // Load Dolibarr environment
26 26
 require_once "../../main.inc.php";
27
-require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
28
-require_once DOL_DOCUMENT_ROOT . "/webportal/lib/webportal.lib.php";
27
+require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
28
+require_once DOL_DOCUMENT_ROOT."/webportal/lib/webportal.lib.php";
29 29
 
30 30
 // Translations
31 31
 $langs->loadLangs(array("admin", "webportal"));
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 // Parameters
37 37
 $action = GETPOST('action', 'aZ09');
38 38
 $backtopage = GETPOST('backtopage', 'alpha');
39
-$modulepart = GETPOST('modulepart', 'aZ09');    // Used by actions_setmoduleoptions.inc.php
39
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
40 40
 
41 41
 $value = GETPOST('value', 'alpha');
42 42
 $label = GETPOST('label', 'alpha');
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
 $useFormSetup = 1;
55 55
 
56 56
 if (!class_exists('FormSetup')) {
57
-	require_once DOL_DOCUMENT_ROOT . '/core/class/html.formsetup.class.php';
57
+	require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsetup.class.php';
58 58
 }
59 59
 
60 60
 $formSetup = new FormSetup($db);
61 61
 
62
-require_once __DIR__ . '/../class/webPortalTheme.class.php';
62
+require_once __DIR__.'/../class/webPortalTheme.class.php';
63 63
 $webPortalTheme = new WebPortalTheme();
64 64
 
65 65
 // Setup conf for secondary color
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
  * Actions
96 96
  */
97 97
 
98
-include DOL_DOCUMENT_ROOT . '/core/actions_setmoduleoptions.inc.php';
98
+include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
99 99
 
100 100
 // Force always edit mode
101 101
 if (empty($action) || $action == 'update') {
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 llxHeader('', $langs->trans($title), $help_url);
116 116
 
117 117
 // Subheader
118
-$linkback = '<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1') . '">' . $langs->trans("BackToModuleList") . '</a>';
118
+$linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>';
119 119
 
120 120
 print load_fiche_titre($langs->trans($title), $linkback, 'title_setup');
121 121
 
@@ -132,10 +132,10 @@  discard block
 block discarded – undo
132 132
 } elseif (!empty($formSetup->items)) {
133 133
 	print $formSetup->generateOutput();
134 134
 	print '<div class="tabsAction">';
135
-	print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=edit&token=' . newToken() . '">' . $langs->trans("Modify") . '</a>';
135
+	print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
136 136
 	print '</div>';
137 137
 } else {
138
-	print '<br>' . $langs->trans("NothingToSetup");
138
+	print '<br>'.$langs->trans("NothingToSetup");
139 139
 }
140 140
 
141 141
 
Please login to merge, or discard this patch.
htdocs/webportal/admin/setup.php 1 patch
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 
25 25
 // Load Dolibarr environment
26 26
 require_once "../../main.inc.php";
27
-require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
28
-require_once DOL_DOCUMENT_ROOT . "/webportal/lib/webportal.lib.php";
27
+require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
28
+require_once DOL_DOCUMENT_ROOT."/webportal/lib/webportal.lib.php";
29 29
 
30 30
 // Translations
31 31
 $langs->loadLangs(array("admin", "webportal"));
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 // Parameters
37 37
 $action = GETPOST('action', 'aZ09');
38 38
 $backtopage = GETPOST('backtopage', 'alpha');
39
-$modulepart = GETPOST('modulepart', 'aZ09');    // Used by actions_setmoduleoptions.inc.php
39
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
40 40
 
41 41
 if (empty($action)) {
42 42
 	$action = 'edit';
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 $useFormSetup = 1;
60 60
 
61 61
 if (!class_exists('FormSetup')) {
62
-	require_once DOL_DOCUMENT_ROOT . '/core/class/html.formsetup.class.php';
62
+	require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsetup.class.php';
63 63
 }
64 64
 
65 65
 $formSetup = new FormSetup($db);
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 $item = $formSetup->newItem('WEBPORTAL_ROOT_URL')->setAsString();
69 69
 $item->fieldAttr = array('placeholder' => 'https://');
70 70
 $item->helpText = $langs->transnoentities('WebPortalRootUrlHelp');
71
-require_once __DIR__ . '/../class/context.class.php';
71
+require_once __DIR__.'/../class/context.class.php';
72 72
 $context = Context::getInstance();
73 73
 $item->fieldOutputOverride = '<a target="_blank" href="'.Context::getRootConfigUrl().'" >'.img_picto('', 'globe', 'class="pictofixedwidth"').Context::getRootConfigUrl().'</a>';
74 74
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
  * Actions
123 123
  */
124 124
 
125
-include DOL_DOCUMENT_ROOT . '/core/actions_setmoduleoptions.inc.php';
125
+include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
126 126
 
127 127
 if ($action == 'updateMask') {
128 128
 	$maskconst = GETPOST('maskconst', 'aZ09');
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
 	$filefound = 0;
154 154
 	$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
155 155
 	foreach ($dirmodels as $reldir) {
156
-		$file = dol_buildpath($reldir . "core/modules/webportal/doc/pdf_" . $modele . "_" . strtolower($tmpobjectkey) . ".modules.php", 0);
156
+		$file = dol_buildpath($reldir."core/modules/webportal/doc/pdf_".$modele."_".strtolower($tmpobjectkey).".modules.php", 0);
157 157
 		if (file_exists($file)) {
158 158
 			$filefound = 1;
159
-			$classname = "pdf_" . $modele . "_" . strtolower($tmpobjectkey);
159
+			$classname = "pdf_".$modele."_".strtolower($tmpobjectkey);
160 160
 			break;
161 161
 		}
162 162
 	}
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		$module = new $classname($db);
168 168
 
169 169
 		if ($module->write_file($tmpobject, $langs) > 0) {
170
-			header("Location: " . DOL_URL_ROOT . "/document.php?modulepart=webportal-" . strtolower($tmpobjectkey) . "&file=SPECIMEN.pdf");
170
+			header("Location: ".DOL_URL_ROOT."/document.php?modulepart=webportal-".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf");
171 171
 			return;
172 172
 		} else {
173 173
 			setEventMessages($module->error, null, 'errors');
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	// TODO Check if numbering module chosen can be activated by calling method canBeActivated
182 182
 	$tmpobjectkey = GETPOST('object');
183 183
 	if (!empty($tmpobjectkey)) {
184
-		$constforval = 'WEBPORTAL_' . strtoupper($tmpobjectkey) . "_ADDON";
184
+		$constforval = 'WEBPORTAL_'.strtoupper($tmpobjectkey)."_ADDON";
185 185
 		dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity);
186 186
 	}
187 187
 } elseif ($action == 'set') {
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	if ($ret > 0) {
193 193
 		$tmpobjectkey = GETPOST('object');
194 194
 		if (!empty($tmpobjectkey)) {
195
-			$constforval = 'WEBPORTAL_' . strtoupper($tmpobjectkey) . '_ADDON_PDF';
195
+			$constforval = 'WEBPORTAL_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
196 196
 			if (getDolGlobalString($constforval) == "$value") {
197 197
 				dolibarr_del_const($db, $constforval, $conf->entity);
198 198
 			}
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	// Set or unset default model
203 203
 	$tmpobjectkey = GETPOST('object');
204 204
 	if (!empty($tmpobjectkey)) {
205
-		$constforval = 'WEBPORTAL_' . strtoupper($tmpobjectkey) . '_ADDON_PDF';
205
+		$constforval = 'WEBPORTAL_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
206 206
 		if (dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity)) {
207 207
 			// The constant that was read before the new set
208 208
 			// We therefore requires a variable to have a coherent view
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 } elseif ($action == 'unsetdoc') {
219 219
 	$tmpobjectkey = GETPOST('object');
220 220
 	if (!empty($tmpobjectkey)) {
221
-		$constforval = 'WEBPORTAL_' . strtoupper($tmpobjectkey) . '_ADDON_PDF';
221
+		$constforval = 'WEBPORTAL_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
222 222
 		dolibarr_del_const($db, $constforval, $conf->entity);
223 223
 	}
224 224
 }
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 llxHeader('', $langs->trans($title), $help_url);
241 241
 
242 242
 // Subheader
243
-$linkback = '<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1') . '">' . $langs->trans("BackToModuleList") . '</a>';
243
+$linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>';
244 244
 
245 245
 print load_fiche_titre($langs->trans($title), $linkback, 'title_setup');
246 246
 
@@ -257,10 +257,10 @@  discard block
 block discarded – undo
257 257
 } elseif (!empty($formSetup->items)) {
258 258
 	print $formSetup->generateOutput();
259 259
 	print '<div class="tabsAction">';
260
-	print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=edit&token=' . newToken() . '">' . $langs->trans("Modify") . '</a>';
260
+	print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
261 261
 	print '</div>';
262 262
 } else {
263
-	print '<br>' . $langs->trans("NothingToSetup");
263
+	print '<br>'.$langs->trans("NothingToSetup");
264 264
 }
265 265
 
266 266
 
@@ -282,26 +282,26 @@  discard block
 block discarded – undo
282 282
 
283 283
 		print '<table class="noborder centpercent">';
284 284
 		print '<tr class="liste_titre">';
285
-		print '<td>' . $langs->trans("Name") . '</td>';
286
-		print '<td>' . $langs->trans("Description") . '</td>';
287
-		print '<td class="nowrap">' . $langs->trans("Example") . '</td>';
288
-		print '<td class="center" width="60">' . $langs->trans("Status") . '</td>';
289
-		print '<td class="center" width="16">' . $langs->trans("ShortInfo") . '</td>';
290
-		print '</tr>' . "\n";
285
+		print '<td>'.$langs->trans("Name").'</td>';
286
+		print '<td>'.$langs->trans("Description").'</td>';
287
+		print '<td class="nowrap">'.$langs->trans("Example").'</td>';
288
+		print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
289
+		print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
290
+		print '</tr>'."\n";
291 291
 
292 292
 		clearstatcache();
293 293
 
294 294
 		foreach ($dirmodels as $reldir) {
295
-			$dir = dol_buildpath($reldir . "core/modules/" . $moduledir);
295
+			$dir = dol_buildpath($reldir."core/modules/".$moduledir);
296 296
 
297 297
 			if (is_dir($dir)) {
298 298
 				$handle = opendir($dir);
299 299
 				if (is_resource($handle)) {
300 300
 					while (($file = readdir($handle)) !== false) {
301
-						if (strpos($file, 'mod_' . strtolower($myTmpObjectKey) . '_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php') {
301
+						if (strpos($file, 'mod_'.strtolower($myTmpObjectKey).'_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php') {
302 302
 							$file = substr($file, 0, dol_strlen($file) - 4);
303 303
 
304
-							require_once $dir . '/' . $file . '.php';
304
+							require_once $dir.'/'.$file.'.php';
305 305
 
306 306
 							$module = new $file($db);
307 307
 
@@ -314,9 +314,9 @@  discard block
 block discarded – undo
314 314
 							}
315 315
 
316 316
 							if ($module->isEnabled()) {
317
-								dol_include_once('/' . $moduledir . '/class/' . strtolower($myTmpObjectKey) . '.class.php');
317
+								dol_include_once('/'.$moduledir.'/class/'.strtolower($myTmpObjectKey).'.class.php');
318 318
 
319
-								print '<tr class="oddeven"><td>' . $module->name . "</td><td>\n";
319
+								print '<tr class="oddeven"><td>'.$module->name."</td><td>\n";
320 320
 								print $module->info();
321 321
 								print '</td>';
322 322
 
@@ -325,20 +325,20 @@  discard block
 block discarded – undo
325 325
 								$tmp = $module->getExample();
326 326
 								if (preg_match('/^Error/', $tmp)) {
327 327
 									$langs->load("errors");
328
-									print '<div class="error">' . $langs->trans($tmp) . '</div>';
328
+									print '<div class="error">'.$langs->trans($tmp).'</div>';
329 329
 								} elseif ($tmp == 'NotConfigured') {
330 330
 									print $langs->trans($tmp);
331 331
 								} else {
332 332
 									print $tmp;
333 333
 								}
334
-								print '</td>' . "\n";
334
+								print '</td>'."\n";
335 335
 
336 336
 								print '<td class="center">';
337
-								$constforvar = 'WEBPORTAL_' . strtoupper($myTmpObjectKey) . '_ADDON';
337
+								$constforvar = 'WEBPORTAL_'.strtoupper($myTmpObjectKey).'_ADDON';
338 338
 								if (getDolGlobalString($constforvar) == $file) {
339 339
 									print img_picto($langs->trans("Activated"), 'switch_on');
340 340
 								} else {
341
-									print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setmod&token=' . newToken() . '&object=' . strtolower($myTmpObjectKey) . '&value=' . urlencode($file) . '">';
341
+									print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&object='.strtolower($myTmpObjectKey).'&value='.urlencode($file).'">';
342 342
 									print img_picto($langs->trans("Disabled"), 'switch_off');
343 343
 									print '</a>';
344 344
 								}
@@ -349,18 +349,18 @@  discard block
 block discarded – undo
349 349
 
350 350
 								// Info
351 351
 								$htmltooltip = '';
352
-								$htmltooltip .= '' . $langs->trans("Version") . ': <b>' . $module->getVersion() . '</b><br>';
352
+								$htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
353 353
 
354 354
 								$nextval = $module->getNextValue($mytmpinstance);
355 355
 								if ("$nextval" != $langs->trans("NotAvailable")) {  // Keep " on nextval
356
-									$htmltooltip .= '' . $langs->trans("NextValue") . ': ';
356
+									$htmltooltip .= ''.$langs->trans("NextValue").': ';
357 357
 									if ($nextval) {
358 358
 										if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
359 359
 											$nextval = $langs->trans($nextval);
360 360
 										}
361
-										$htmltooltip .= $nextval . '<br>';
361
+										$htmltooltip .= $nextval.'<br>';
362 362
 									} else {
363
-										$htmltooltip .= $langs->trans($module->error) . '<br>';
363
+										$htmltooltip .= $langs->trans($module->error).'<br>';
364 364
 									}
365 365
 								}
366 366
 
@@ -391,9 +391,9 @@  discard block
 block discarded – undo
391 391
 		// Load array def with activated templates
392 392
 		$def = array();
393 393
 		$sql = "SELECT nom";
394
-		$sql .= " FROM " . $db->prefix() . "document_model";
395
-		$sql .= " WHERE type = '" . $db->escape($type) . "'";
396
-		$sql .= " AND entity = " . $conf->entity;
394
+		$sql .= " FROM ".$db->prefix()."document_model";
395
+		$sql .= " WHERE type = '".$db->escape($type)."'";
396
+		$sql .= " AND entity = ".$conf->entity;
397 397
 		$resql = $db->query($sql);
398 398
 		if ($resql) {
399 399
 			$i = 0;
@@ -409,19 +409,19 @@  discard block
 block discarded – undo
409 409
 
410 410
 		print "<table class=\"noborder\" width=\"100%\">\n";
411 411
 		print "<tr class=\"liste_titre\">\n";
412
-		print '<td>' . $langs->trans("Name") . '</td>';
413
-		print '<td>' . $langs->trans("Description") . '</td>';
414
-		print '<td class="center" width="60">' . $langs->trans("Status") . "</td>\n";
415
-		print '<td class="center" width="60">' . $langs->trans("Default") . "</td>\n";
416
-		print '<td class="center" width="38">' . $langs->trans("ShortInfo") . '</td>';
417
-		print '<td class="center" width="38">' . $langs->trans("Preview") . '</td>';
412
+		print '<td>'.$langs->trans("Name").'</td>';
413
+		print '<td>'.$langs->trans("Description").'</td>';
414
+		print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
415
+		print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
416
+		print '<td class="center" width="38">'.$langs->trans("ShortInfo").'</td>';
417
+		print '<td class="center" width="38">'.$langs->trans("Preview").'</td>';
418 418
 		print "</tr>\n";
419 419
 
420 420
 		clearstatcache();
421 421
 
422 422
 		foreach ($dirmodels as $reldir) {
423 423
 			foreach (array('', '/doc') as $valdir) {
424
-				$realpath = $reldir . "core/modules/" . $moduledir . $valdir;
424
+				$realpath = $reldir."core/modules/".$moduledir.$valdir;
425 425
 				$dir = dol_buildpath($realpath);
426 426
 
427 427
 				if (is_dir($dir)) {
@@ -435,11 +435,11 @@  discard block
 block discarded – undo
435 435
 
436 436
 						foreach ($filelist as $file) {
437 437
 							if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
438
-								if (file_exists($dir . '/' . $file)) {
438
+								if (file_exists($dir.'/'.$file)) {
439 439
 									$name = substr($file, 4, dol_strlen($file) - 16);
440 440
 									$classname = substr($file, 0, dol_strlen($file) - 12);
441 441
 
442
-									require_once $dir . '/' . $file;
442
+									require_once $dir.'/'.$file;
443 443
 									$module = new $classname($db);
444 444
 
445 445
 									$modulequalified = 1;
@@ -463,40 +463,40 @@  discard block
 block discarded – undo
463 463
 
464 464
 										// Active
465 465
 										if (in_array($name, $def)) {
466
-											print '<td class="center">' . "\n";
467
-											print '<a href="' . $_SERVER["PHP_SELF"] . '?action=del&token=' . newToken() . '&value=' . urlencode($name) . '">';
466
+											print '<td class="center">'."\n";
467
+											print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
468 468
 											print img_picto($langs->trans("Enabled"), 'switch_on');
469 469
 											print '</a>';
470 470
 											print '</td>';
471 471
 										} else {
472
-											print '<td class="center">' . "\n";
473
-											print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&token=' . newToken() . '&value=' . urlencode($name) . '&scan_dir=' . urlencode($module->scandir) . '&label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
472
+											print '<td class="center">'."\n";
473
+											print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
474 474
 											print "</td>";
475 475
 										}
476 476
 
477 477
 										// Default
478 478
 										print '<td class="center">';
479
-										$constforvar = 'WEBPORTAL_' . strtoupper($myTmpObjectKey) . '_ADDON_PDF';
479
+										$constforvar = 'WEBPORTAL_'.strtoupper($myTmpObjectKey).'_ADDON_PDF';
480 480
 										if (getDolGlobalString($constforvar) == $name) {
481 481
 											//print img_picto($langs->trans("Default"), 'on');
482 482
 											// Even if choice is the default value, we allow to disable it. Replace this with previous line if you need to disable unset
483
-											print '<a href="' . $_SERVER["PHP_SELF"] . '?action=unsetdoc&token=' . newToken() . '&object=' . urlencode(strtolower($myTmpObjectKey)) . '&value=' . urlencode($name) . '&scan_dir=' . urlencode($module->scandir) . '&label=' . urlencode($module->name) . '&amp;type=' . urlencode($type) . '" alt="' . $langs->trans("Disable") . '">' . img_picto($langs->trans("Enabled"), 'on') . '</a>';
483
+											print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&object='.urlencode(strtolower($myTmpObjectKey)).'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&amp;type='.urlencode($type).'" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
484 484
 										} else {
485
-											print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setdoc&token=' . newToken() . '&object=' . urlencode(strtolower($myTmpObjectKey)) . '&value=' . urlencode($name) . '&scan_dir=' . urlencode($module->scandir) . '&label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
485
+											print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&object='.urlencode(strtolower($myTmpObjectKey)).'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
486 486
 										}
487 487
 										print '</td>';
488 488
 
489 489
 										// Info
490
-										$htmltooltip = '' . $langs->trans("Name") . ': ' . $module->name;
491
-										$htmltooltip .= '<br>' . $langs->trans("Type") . ': ' . ($module->type ? $module->type : $langs->trans("Unknown"));
490
+										$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
491
+										$htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
492 492
 										if ($module->type == 'pdf') {
493
-											$htmltooltip .= '<br>' . $langs->trans("Width") . '/' . $langs->trans("Height") . ': ' . $module->page_largeur . '/' . $module->page_hauteur;
493
+											$htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
494 494
 										}
495
-										$htmltooltip .= '<br>' . $langs->trans("Path") . ': ' . preg_replace('/^\//', '', $realpath) . '/' . $file;
495
+										$htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
496 496
 
497
-										$htmltooltip .= '<br><br><u>' . $langs->trans("FeaturesSupported") . ':</u>';
498
-										$htmltooltip .= '<br>' . $langs->trans("Logo") . ': ' . yn($module->option_logo, 1, 1);
499
-										$htmltooltip .= '<br>' . $langs->trans("MultiLanguage") . ': ' . yn($module->option_multilang, 1, 1);
497
+										$htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
498
+										$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
499
+										$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
500 500
 
501 501
 										print '<td class="center">';
502 502
 										print $form->textwithpicto('', $htmltooltip, 1, 0);
@@ -505,8 +505,8 @@  discard block
 block discarded – undo
505 505
 										// Preview
506 506
 										print '<td class="center">';
507 507
 										if ($module->type == 'pdf') {
508
-											$newname = preg_replace('/_' . preg_quote(strtolower($myTmpObjectKey), '/') . '/', '', $name);
509
-											print '<a href="' . $_SERVER["PHP_SELF"] . '?action=specimen&module=' . urlencode($newname) . '&object=' . urlencode($myTmpObjectKey) . '">' . img_object($langs->trans("Preview"), 'pdf') . '</a>';
508
+											$newname = preg_replace('/_'.preg_quote(strtolower($myTmpObjectKey), '/').'/', '', $name);
509
+											print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.urlencode($newname).'&object='.urlencode($myTmpObjectKey).'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
510 510
 										} else {
511 511
 											print img_object($langs->trans("PreviewNotAvailable"), 'generic');
512 512
 										}
Please login to merge, or discard this patch.
htdocs/webportal/admin/configcss.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 
26 26
 // Load Dolibarr environment
27 27
 require_once "../../main.inc.php";
28
-require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
29
-require_once DOL_DOCUMENT_ROOT . "/webportal/lib/webportal.lib.php";
28
+require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
29
+require_once DOL_DOCUMENT_ROOT."/webportal/lib/webportal.lib.php";
30 30
 
31 31
 // Translations
32 32
 $langs->loadLangs(array("admin", "hrm", "other"));
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 );
99 99
 
100 100
 // Subheader
101
-$linkback = '<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1') . '">' . $langs->trans("BackToModuleList") . '</a>';
101
+$linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>';
102 102
 
103 103
 print load_fiche_titre($langs->trans($title), $linkback, 'title_setup');
104 104
 
@@ -107,14 +107,14 @@  discard block
 block discarded – undo
107 107
 print dol_get_fiche_head($head, 'css', $langs->trans($title), -1, "webportal");
108 108
 
109 109
 // Setup page goes here
110
-echo '<span class="opacitymedium">' . $langs->trans("WebPortalCSS") . '</span><br><br>';
110
+echo '<span class="opacitymedium">'.$langs->trans("WebPortalCSS").'</span><br><br>';
111 111
 
112 112
 //WYSIWYG Editor
113
-require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
113
+require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
114 114
 
115
-print '<form enctype="multipart/form-data" method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
115
+print '<form enctype="multipart/form-data" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
116 116
 
117
-print '<input type="hidden" name="token" value="' . newToken() . '">';
117
+print '<input type="hidden" name="token" value="'.newToken().'">';
118 118
 print '<input type="hidden" name="action" value="updatecss">';
119 119
 
120 120
 clearstatcache();
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
 
131 131
 $doleditor = new DolEditor('WEBPORTAL_CUSTOM_CSS', $customcssValue, '80%', 400, 'Basic', 'In', true, false, 'ace', 10, '90%');
132 132
 $doleditor->Create(0, '', true, 'css', 'css');
133
-print '</td></tr>' . "\n";
133
+print '</td></tr>'."\n";
134 134
 
135
-print '</table>' . "\n";
135
+print '</table>'."\n";
136 136
 print '</div>';
137 137
 
138 138
 print '<div class="center">';
139
-print '<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="' . $langs->trans("Save") . '">';
140
-print '<input class="button button-cancel reposition" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
139
+print '<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="'.$langs->trans("Save").'">';
140
+print '<input class="button button-cancel reposition" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
141 141
 print '</div>';
142 142
 
143 143
 print '</form>';
Please login to merge, or discard this patch.
htdocs/ai/admin/setup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 // Parameters
35 35
 $action = GETPOST('action', 'aZ09');
36 36
 $backtopage = GETPOST('backtopage', 'alpha');
37
-$modulepart = GETPOST('modulepart', 'aZ09');	// Used by actions_setmoduleoptions.inc.php
37
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
38 38
 
39 39
 $value = GETPOST('value', 'alpha');
40 40
 $label = GETPOST('label', 'alpha');
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 $arrayofia = array('chatgpt');
63 63
 
64
-foreach($arrayofia as $ia) {
64
+foreach ($arrayofia as $ia) {
65 65
 	// Setup conf AI_PUBLIC_INTERFACE_TOPIC
66 66
 	$item = $formSetup->newItem('AI_KEY_API_'.strtoupper($ia));
67 67
 	$item->defaultFieldValue = '';
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 // Retrieve existing API Key
71 71
 //$apiKey = dolibarr_get_const($db, 'MAIN_AI_CHATGPT_API_KEY');
72 72
 
73
-$setupnotempty =+ count($formSetup->items);
73
+$setupnotempty = + count($formSetup->items);
74 74
 
75 75
 
76 76
 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
Please login to merge, or discard this patch.