Completed
Branch develop (1d589f)
by
unknown
21:18
created
htdocs/core/modules/modSociete.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 		$this->rights[$r][0] = 130;
203 203
 		$this->rights[$r][1] = 'Modify thirdparty information payment';
204 204
 		$this->rights[$r][3] = 0;
205
-		$this->rights[$r][4] = 'thirdparty_paymentinformation_advance';      // Visible if option MAIN_USE_ADVANCED_PERMS is on
205
+		$this->rights[$r][4] = 'thirdparty_paymentinformation_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
206 206
 		$this->rights[$r][5] = 'write';
207 207
 
208 208
 		// 262 : Restrict access to sales representative
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
 		}
705 705
 		// Add profids as criteria to search duplicates
706 706
 		$langs->load("companies");
707
-		$i=1;
707
+		$i = 1;
708 708
 		while ($i <= 6) {
709 709
 			if ($i == 1) {
710 710
 				$this->import_updatekeys_array[$r]['s.siren'] = 'ProfId1'.(empty($mysoc->country_code) ? '' : $mysoc->country_code);
Please login to merge, or discard this patch.
htdocs/fourn/facture/note.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
 			$facavoir->fetch($facid);
178 178
 			$invoicecredits[] = $facavoir->getNomUrl(1);
179 179
 		}
180
-		print ' ('.$langs->transnoentities("InvoiceHasAvoir") . implode(',', $invoicecredits) . ')';
180
+		print ' ('.$langs->transnoentities("InvoiceHasAvoir").implode(',', $invoicecredits).')';
181 181
 	}
182 182
 	/*
183 183
 	if ($facidnext > 0) {
Please login to merge, or discard this patch.
htdocs/fourn/product/list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@
 block discarded – undo
29 29
 
30 30
 // Load Dolibarr environment
31 31
 require '../../main.inc.php';
32
-require_once DOL_DOCUMENT_ROOT .'/product/class/product.class.php';
33
-require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php';
34
-require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.class.php';
32
+require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
33
+require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
34
+require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
35 35
 
36 36
 
37 37
 // Load translation files required by the page
Please login to merge, or discard this patch.
htdocs/margin/productMargins.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 
66 66
 $startdate = $enddate = '';
67 67
 if (GETPOST('startdatemonth')) {
68
-	$startdate = dol_mktime(0, 0, 0, GETPOST('startdatemonth', 'int'),  GETPOST('startdateday', 'int'),  GETPOST('startdateyear', 'int'));
68
+	$startdate = dol_mktime(0, 0, 0, GETPOST('startdatemonth', 'int'), GETPOST('startdateday', 'int'), GETPOST('startdateyear', 'int'));
69 69
 }
70 70
 if (GETPOST('enddatemonth')) {
71 71
 	$enddate = dol_mktime(23, 59, 59, GETPOST('enddatemonth', 'int'), GETPOST('enddateday', 'int'), GETPOST('enddateyear'));
Please login to merge, or discard this patch.
htdocs/modulebuilder/template/scripts/mymodule.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 //if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule');	// Force authentication handler
41 41
 //if (! defined('CSRFCHECK_WITH_TOKEN'))     define('CSRFCHECK_WITH_TOKEN', '1');		// Force use of CSRF protection with tokens even for GET
42 42
 //if (! defined('NOBROWSERNOTIF'))     		 define('NOBROWSERNOTIF', '1');				// Disable browser notification
43
-if (!defined('NOSESSION')) define('NOSESSION', '1');	// On CLI mode, no need to use web sessions
43
+if (!defined('NOSESSION')) define('NOSESSION', '1'); // On CLI mode, no need to use web sessions
44 44
 
45 45
 
46 46
 $sapi_type = php_sapi_name();
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,10 @@
 block discarded – undo
40 40
 //if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule');	// Force authentication handler
41 41
 //if (! defined('CSRFCHECK_WITH_TOKEN'))     define('CSRFCHECK_WITH_TOKEN', '1');		// Force use of CSRF protection with tokens even for GET
42 42
 //if (! defined('NOBROWSERNOTIF'))     		 define('NOBROWSERNOTIF', '1');				// Disable browser notification
43
-if (!defined('NOSESSION')) define('NOSESSION', '1');	// On CLI mode, no need to use web sessions
43
+if (!defined('NOSESSION')) {
44
+	define('NOSESSION', '1');
45
+}
46
+// On CLI mode, no need to use web sessions
44 47
 
45 48
 
46 49
 $sapi_type = php_sapi_name();
Please login to merge, or discard this patch.
template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 		$maxfilesizearray = getMaxFileSizeArray();
188 188
 		$maxmin = $maxfilesizearray['maxmin'];
189 189
 		if ($maxmin > 0) {
190
-			$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
190
+			$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
191 191
 		}
192 192
 		$texte .= ' <input type="file" name="uploadfile">';
193 193
 		$texte .= '<input type="hidden" value="MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 				$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
283 283
 				$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
284 284
 
285
-				$newfiletmp = $objectref . '_' . $newfiletmp;
285
+				$newfiletmp = $objectref.'_'.$newfiletmp;
286 286
 				//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
287 287
 
288 288
 				// Get extension (ods or odt)
@@ -292,11 +292,11 @@  discard block
 block discarded – undo
292 292
 					if ($format == '1') {
293 293
 						$format = '%Y%m%d%H%M%S';
294 294
 					}
295
-					$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
295
+					$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
296 296
 				} else {
297
-					$filename = $newfiletmp . '.' . $newfileformat;
297
+					$filename = $newfiletmp.'.'.$newfileformat;
298 298
 				}
299
-				$file = $dir . '/' . $filename;
299
+				$file = $dir.'/'.$filename;
300 300
 				//print "newdir=".$dir;
301 301
 				//print "newfile=".$newfile;
302 302
 				//print "file=".$file;
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 				dol_mkdir($conf->mymodule->dir_temp);
306 306
 				if (!is_writable($conf->mymodule->dir_temp)) {
307 307
 					$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->mymodule->dir_temp);
308
-					dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
308
+					dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
309 309
 					return -1;
310 310
 				}
311 311
 
Please login to merge, or discard this patch.
htdocs/modulebuilder/template/myobject_agenda.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,9 @@
 block discarded – undo
149 149
 if (!isModEnabled("mymodule")) {
150 150
 	accessforbidden();
151 151
 }
152
-if (!$permissiontoread) accessforbidden();
152
+if (!$permissiontoread) {
153
+	accessforbidden();
154
+}
153 155
 
154 156
 
155 157
 /*
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@
 block discarded – undo
310 310
 		//require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
311 311
 		//$cachekey = 'count_events_myobject_'.$object->id;
312 312
 		//$nbEvent = dol_getcache($cachekey);
313
-		$titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '<span class="opacitymedium colorblack paddingleft">('.$nbEvent.')</span>': '');
313
+		$titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '<span class="opacitymedium colorblack paddingleft">('.$nbEvent.')</span>' : '');
314 314
 
315 315
 		print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0);
316 316
 
Please login to merge, or discard this patch.
htdocs/modulebuilder/template/myobject_list.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -192,7 +192,9 @@  discard block
 block discarded – undo
192 192
 }
193 193
 
194 194
 // Security check (enable the most restrictive one)
195
-if ($user->socid > 0) accessforbidden();
195
+if ($user->socid > 0) {
196
+	accessforbidden();
197
+}
196 198
 //if ($user->socid > 0) accessforbidden();
197 199
 //$socid = 0; if ($user->socid > 0) $socid = $user->socid;
198 200
 //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
@@ -200,7 +202,9 @@  discard block
 block discarded – undo
200 202
 if (!isModEnabled("mymodule")) {
201 203
 	accessforbidden('Module mymodule not enabled');
202 204
 }
203
-if (!$permissiontoread) accessforbidden();
205
+if (!$permissiontoread) {
206
+	accessforbidden();
207
+}
204 208
 
205 209
 
206 210
 /*
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 $object = new MyObject($db);
119 119
 $extrafields = new ExtraFields($db);
120 120
 $diroutputmassaction = $conf->mymodule->dir_output.'/temp/massgeneration/'.$user->id;
121
-$hookmanager->initHooks(array($contextpage)); 	// Note that conf->hooks_modules contains array of activated contexes
121
+$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes
122 122
 
123 123
 // Fetch optionals attributes and labels
124 124
 $extrafields->fetch_name_optionals_label($object->table_element);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
 // Default sort order (if not yet defined by previous GETPOST)
130 130
 if (!$sortfield) {
131
-	reset($object->fields);					// Reset is required to avoid key() to return null.
131
+	reset($object->fields); // Reset is required to avoid key() to return null.
132 132
 	$sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition.
133 133
 }
134 134
 if (!$sortorder) {
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 // Output page
423 423
 // --------------------------------------------------------------------
424 424
 
425
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');	// Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
425
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
426 426
 
427 427
 // Example : Adding jquery code
428 428
 // print '<script type="text/javascript">
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
 	} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
647 647
 		$cssforfield .= ($cssforfield ? ' ' : '').'right';
648 648
 	}
649
-	$cssforfield = preg_replace('/small\s*/', '', $cssforfield);	// the 'small' css must not be used for the title label
649
+	$cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
650 650
 	if (!empty($arrayfields['t.'.$key]['checked'])) {
651 651
 		print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n";
652 652
 		$totalarray['nbfield']++;
Please login to merge, or discard this patch.
htdocs/holiday/define_holiday.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
47 47
 $sortfield = GETPOST('sortfield', 'aZ09comma');
48 48
 $sortorder = GETPOST('sortorder', 'aZ09comma');
49
-$toselect   = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
49
+$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
50 50
 $confirm = GETPOST('confirm', 'alpha');
51 51
 
52 52
 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
@@ -254,12 +254,12 @@  discard block
 block discarded – undo
254 254
 	foreach ($typeleaves as $key => $val) {
255 255
 		$labeltypes[$val['id']] = ($langs->trans($val['code']) != $val['code']) ? $langs->trans($val['code']) : $langs->trans($val['label']);
256 256
 	}
257
-	$formquestion [] = array( 'type' => 'other',
257
+	$formquestion [] = array('type' => 'other',
258 258
 		'name' => 'typeofholiday',
259 259
 		'label' => $langs->trans("Type"),
260 260
 		'value' => $form->selectarray('typeholiday', $labeltypes, GETPOST('typeholiday', 'alpha'), 1)
261 261
 	);
262
-	$formquestion [] = array( 'type' => 'other',
262
+	$formquestion [] = array('type' => 'other',
263 263
 		'name' => 'nbdaysholydays',
264 264
 		'label' => $langs->trans("NumberDayAddMass"),
265 265
 		'value' => '<input name="nbdaysholidays" class="maxwidth75" id="nbdaysholidays" value="'.GETPOST('nbdaysholidays', 'int').'">'
Please login to merge, or discard this patch.