Completed
Branch develop (fe1b6c)
by
unknown
12:26
created
htdocs/core/ajax/check_notifications.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
 	$sql = 'SELECT a.id as id_agenda, a.code, a.datep, a.label, a.location, ar.rowid as id_reminder, ar.dateremind, ar.fk_user as id_user_reminder';
129 129
 	$sql .= ' FROM '.MAIN_DB_PREFIX.'actioncomm as a';
130 130
 	$sql .= ' INNER JOIN '.MAIN_DB_PREFIX.'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = '.((int) $user->id);
131
-	$sql .= " AND ar.typeremind = 'browser' AND ar.dateremind < '".$db->idate(dol_now())."' AND ar.status = 0 AND ar.entity = ".((int) $conf->entity);	// No sharing of entity for alerts
131
+	$sql .= " AND ar.typeremind = 'browser' AND ar.dateremind < '".$db->idate(dol_now())."' AND ar.status = 0 AND ar.entity = ".((int) $conf->entity); // No sharing of entity for alerts
132 132
 	$sql .= $db->order('datep', 'ASC');
133 133
 	$sql .= $db->plimit(10); // Avoid too many notification at once
134 134
 
Please login to merge, or discard this patch.
htdocs/core/ajax/fileupload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php';
41 41
 
42 42
 $id = GETPOST('fk_element', 'int');
43
-$element = GETPOST('element', 'alpha');	// 'myobject' (myobject=mymodule) or 'myobject@mymodule' or 'myobject_mysubobject' (myobject=mymodule)
43
+$element = GETPOST('element', 'alpha'); // 'myobject' (myobject=mymodule) or 'myobject@mymodule' or 'myobject_mysubobject' (myobject=mymodule)
44 44
 $elementupload = $element;
45 45
 
46 46
 // Load object according to $id and $element
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 if (!empty($user->socid)) {
61 61
 	$socid = $user->socid;
62 62
 	if (!empty($object->socid) && $socid != $object->socid) {
63
-		httponly_accessforbidden("Access on object not allowed for this external user.");	// This includes the exit.
63
+		httponly_accessforbidden("Access on object not allowed for this external user."); // This includes the exit.
64 64
 	}
65 65
 }
66 66
 
67
-$result = restrictedArea($user, $object->module, $object, $object->table_element, $usesublevelpermission, 'fk_soc', 'rowid', 0, 1);	// Call with mode return
67
+$result = restrictedArea($user, $object->module, $object, $object->table_element, $usesublevelpermission, 'fk_soc', 'rowid', 0, 1); // Call with mode return
68 68
 if (!$result) {
69 69
 	httponly_accessforbidden('Not allowed by restrictArea (module='.$object->module.' table_element='.$object->table_element.')');
70 70
 }
Please login to merge, or discard this patch.
htdocs/core/ajax/extraparams.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 //print $object->id.' - '.$object->module.' - '.$object->element.' - '.$object->table_element.' - '.$usesublevelpermission."\n";
58 58
 
59 59
 // Security check
60
-$result = restrictedArea($user, $object->module, $object, $object->table_element, $usesublevelpermission, 'fk_soc', 'rowid', 0, 1);	// Call with mode return
60
+$result = restrictedArea($user, $object->module, $object, $object->table_element, $usesublevelpermission, 'fk_soc', 'rowid', 0, 1); // Call with mode return
61 61
 if (!$result) {
62 62
 	httponly_accessforbidden('Not allowed by restrictArea');
63 63
 }
Please login to merge, or discard this patch.
htdocs/core/ajax/ajaxtooltip.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
 
42 42
 $id = GETPOST('id', 'aZ09');
43
-$objecttype = GETPOST('objecttype', 'aZ09arobase');	// 'module' or 'myobject@mymodule', 'mymodule_myobject'
43
+$objecttype = GETPOST('objecttype', 'aZ09arobase'); // 'module' or 'myobject@mymodule', 'mymodule_myobject'
44 44
 
45 45
 $params = array('fromajaxtooltip' => 1);
46 46
 if (GETPOSTISSET('infologin')) {
Please login to merge, or discard this patch.
htdocs/core/ajax/flowjs-server.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 $flowChunkSize = GETPOST('flowChunkSize', 'alpha');
56 56
 $flowTotalSize = GETPOST('flowTotalSize', 'alpha');
57 57
 
58
-$result = restrictedArea($user, $module, 0, '', 0, 'fk_soc', 'rowid', 0, 1);	// Call with mode return
58
+$result = restrictedArea($user, $module, 0, '', 0, 'fk_soc', 'rowid', 0, 1); // Call with mode return
59 59
 
60 60
 if ($action != 'upload') {
61 61
 	httponly_accessforbidden("Param action must be 'upload'");
@@ -160,10 +160,10 @@  discard block
 block discarded – undo
160 160
 
161 161
 	// check that all the parts are present
162 162
 	// the size of the last part is between chunkSize and 2*$chunkSize
163
-	if ($total_files * $chunkSize >=  ($totalSize - $chunkSize + 1)) {
163
+	if ($total_files * $chunkSize >= ($totalSize - $chunkSize + 1)) {
164 164
 		// create the final destination file
165 165
 		if (($fp = fopen($upload_dir.'/'.$fileName, 'w')) !== false) {
166
-			for ($i=1; $i<=$total_files; $i++) {
166
+			for ($i = 1; $i <= $total_files; $i++) {
167 167
 				fwrite($fp, file_get_contents($temp_dir.'/'.$fileName.'.part'.$i));
168 168
 				dol_syslog('writing chunk '.$i);
169 169
 			}
Please login to merge, or discard this patch.
htdocs/core/ajax/selectobject.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 $htmlname = GETPOST('htmlname', 'aZ09');
45 45
 $outjson = (GETPOST('outjson', 'int') ? GETPOST('outjson', 'int') : 0);
46 46
 $id = GETPOST('id', 'int');
47
-$filter = GETPOST('filter', 'alphanohtml');	// Universal Syntax filter
47
+$filter = GETPOST('filter', 'alphanohtml'); // Universal Syntax filter
48 48
 
49 49
 if (empty($htmlname)) {
50 50
 	httponly_accessforbidden('Bad value for param htmlname');
Please login to merge, or discard this patch.
htdocs/core/tpl/massactions_pre.tpl.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 if ($massaction == 'preclonetasks') {
44 44
 	$selected = '';
45 45
 	foreach (GETPOST('toselect') as $tmpselected) {
46
-		$selected .= '&selected[]=' . $tmpselected;
46
+		$selected .= '&selected[]='.$tmpselected;
47 47
 	}
48 48
 
49 49
 	$formquestion = array(
50
-		array('type' => 'other', 'name' => 'projectid', 'label' => $langs->trans('Project') .': ', 'value' => $form->selectProjects('', 'projectid', '', '', '', '', '', '', '', 1, 1)),
50
+		array('type' => 'other', 'name' => 'projectid', 'label' => $langs->trans('Project').': ', 'value' => $form->selectProjects('', 'projectid', '', '', '', '', '', '', '', 1, 1)),
51 51
 	);
52
-	print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id . $selected, $langs->trans('ConfirmMassClone'), '', 'clonetasks', $formquestion, '', 1, 300, 590);
52
+	print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.$selected, $langs->trans('ConfirmMassClone'), '', 'clonetasks', $formquestion, '', 1, 300, 590);
53 53
 }
54 54
 
55 55
 if ($massaction == 'preaffecttag' && isModEnabled('category')) {
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 			$result = $objecttmp->fetch($toselectid);
181 181
 			if ($result > 0) {
182 182
 				$listofselectedid[$toselectid] = $toselectid;
183
-				$thirdpartyid = ($objecttmp->fk_soc ? $objecttmp->fk_soc : $objecttmp->socid);	// For proposal, order, invoice, conferenceorbooth, ...
183
+				$thirdpartyid = ($objecttmp->fk_soc ? $objecttmp->fk_soc : $objecttmp->socid); // For proposal, order, invoice, conferenceorbooth, ...
184 184
 				if (in_array($objecttmp->element, array('societe', 'conferenceorboothattendee'))) {
185 185
 					$thirdpartyid = $objecttmp->id;
186 186
 				} elseif ($objecttmp->element == 'contact') {
@@ -261,14 +261,14 @@  discard block
 block discarded – undo
261 261
 		$formmail->withfile = 0;
262 262
 		$formmail->withmaindocfile = 0; // Add a checkbox "Attach also main document"
263 263
 	} else {
264
-		$formmail->withfile = 1;    // $formmail->withfile = 2 to allow to upload files is not yet supported in mass action
264
+		$formmail->withfile = 1; // $formmail->withfile = 2 to allow to upload files is not yet supported in mass action
265 265
 		// Add a checkbox "Attach also main document"
266 266
 		if (isset($withmaindocfilemail)) {
267 267
 			$formmail->withmaindocfile = $withmaindocfilemail;
268 268
 		} else {    // Do an automatic definition of $formmail->withmaindocfile
269 269
 			$formmail->withmaindocfile = 1;
270 270
 			if ($objecttmp->element != 'societe') {
271
-				$formmail->withfile = '<span class="hideonsmartphone opacitymedium">' . $langs->trans("OnlyPDFattachmentSupported") . '</span>';
271
+				$formmail->withfile = '<span class="hideonsmartphone opacitymedium">'.$langs->trans("OnlyPDFattachmentSupported").'</span>';
272 272
 				$formmail->withmaindocfile = -1; // Add a checkbox "Attach also main document" but not checked by default
273 273
 			}
274 274
 		}
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 
297 297
 	// Tableau des parametres complementaires du post
298 298
 	$formmail->param['action'] = $action;
299
-	$formmail->param['models'] = $modelmail;	// the filter to know which kind of template emails to show. 'none' means no template suggested.
299
+	$formmail->param['models'] = $modelmail; // the filter to know which kind of template emails to show. 'none' means no template suggested.
300 300
 	$formmail->param['models_id'] = GETPOST('modelmailselected', 'int') ? GETPOST('modelmailselected', 'int') : '-1';
301 301
 	$formmail->param['id'] = join(',', $arrayofselected);
302 302
 	// $formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;
@@ -339,12 +339,12 @@  discard block
 block discarded – undo
339 339
 		$outputShowOutputFields = '<div class="extrafields-inputs">';
340 340
 
341 341
 		foreach ($extrafields_list as $extraKey => $extraLabel) {
342
-			$outputShowOutputFields.= '<div class="mass-action-extrafield" data-extrafield="'.$extraKey.'" style="display:none;" >';
343
-			$outputShowOutputFields.= '<br><span>'. $langs->trans('NewValue').'</span>';
344
-			$outputShowOutputFields.= $extrafields->showInputField($extraKey, '', '', $keysuffix, '', 0, $objecttmp->id, $objecttmp->table_element);
345
-			$outputShowOutputFields.= '</div>';
342
+			$outputShowOutputFields .= '<div class="mass-action-extrafield" data-extrafield="'.$extraKey.'" style="display:none;" >';
343
+			$outputShowOutputFields .= '<br><span>'.$langs->trans('NewValue').'</span>';
344
+			$outputShowOutputFields .= $extrafields->showInputField($extraKey, '', '', $keysuffix, '', 0, $objecttmp->id, $objecttmp->table_element);
345
+			$outputShowOutputFields .= '</div>';
346 346
 		}
347
-		$outputShowOutputFields.= '<script>
347
+		$outputShowOutputFields .= '<script>
348 348
 		jQuery(function($) {
349 349
             $("#extrafield-key-to-update").on(\'change\',function(){
350 350
             	let selectedExtrtafield = $(this).val();
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
             });
356 356
 		});
357 357
 		</script>';
358
-		$outputShowOutputFields.= '</div>';
358
+		$outputShowOutputFields .= '</div>';
359 359
 
360 360
 
361 361
 
Please login to merge, or discard this patch.
htdocs/core/tpl/login.tpl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 	?>
401 401
 	<div class="center login_main_message">
402 402
 	<?php
403
-	$message = $_SESSION['dol_loginmesg'];	// By default this is an error message
403
+	$message = $_SESSION['dol_loginmesg']; // By default this is an error message
404 404
 	if (preg_match('/<!-- warning -->/', $message)) {	// if it contains this comment, this is a warning message
405 405
 		$message = str_replace('<!-- warning -->', '', $message);
406 406
 		print '<div class="warning">';
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 		$resgetcommitstrip = getURLContent("https://www.commitstrip.com/en/feed/");
424 424
 	}
425 425
 	if ($resgetcommitstrip && $resgetcommitstrip['http_code'] == '200') {
426
-		$xml = simplexml_load_string($resgetcommitstrip['content'], 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
426
+		$xml = simplexml_load_string($resgetcommitstrip['content'], 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NONET);
427 427
 		$little = $xml->channel->item[0]->children('content', true);
428 428
 		print preg_replace('/width="650" height="658"/', '', $little->encoded);
429 429
 	}
Please login to merge, or discard this patch.
htdocs/core/tpl/extrafields_view.tpl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
 			$html_id = !empty($object->id) ? $object->element.'_extras_'.$tmpkeyextra.'_'.$object->id : '';
217 217
 
218
-			print '<td id="' . $html_id . '" class="valuefield ' . $object->element . '_extras_' . $tmpkeyextra . ' wordbreakimp"' . (!empty($cols) ? ' colspan="' . $cols . '"' : '') . '>';
218
+			print '<td id="'.$html_id.'" class="valuefield '.$object->element.'_extras_'.$tmpkeyextra.' wordbreakimp"'.(!empty($cols) ? ' colspan="'.$cols.'"' : '').'>';
219 219
 
220 220
 			// Convert date into timestamp format
221 221
 			if (in_array($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra], array('date'))) {
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 				if ($object->table_element == 'societe') {
244 244
 					$fieldid = 'socid';
245 245
 				}
246
-				print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"] . '?' . $fieldid . '=' . $object->id . '" method="post" name="formextra">';
246
+				print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'?'.$fieldid.'='.$object->id.'" method="post" name="formextra">';
247 247
 				print '<input type="hidden" name="action" value="update_extras">';
248 248
 				print '<input type="hidden" name="attribute" value="'.$tmpkeyextra.'">';
249 249
 				print '<input type="hidden" name="token" value="'.newToken().'">';
Please login to merge, or discard this patch.