Passed
Branch develop (3f4b05)
by Laurent
95:01
created
htdocs/loan/class/loan.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -987,7 +987,7 @@
 block discarded – undo
987 987
 		$result .= $linkend;
988 988
 
989 989
 		global $action;
990
-		$hookmanager->initHooks(array($this->element . 'dao'));
990
+		$hookmanager->initHooks(array($this->element.'dao'));
991 991
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
992 992
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
993 993
 		if ($reshook > 0) {
Please login to merge, or discard this patch.
htdocs/compta/sociales/class/chargesociales.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -954,7 +954,7 @@
 block discarded – undo
954 954
 		}
955 955
 		$result .= $linkend;
956 956
 		global $action;
957
-		$hookmanager->initHooks(array($this->element . 'dao'));
957
+		$hookmanager->initHooks(array($this->element.'dao'));
958 958
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
959 959
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
960 960
 		if ($reshook > 0) {
Please login to merge, or discard this patch.
htdocs/compta/facture/class/facture-rec.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -954,7 +954,7 @@
 block discarded – undo
954 954
 		}
955 955
 		$result .= $linkend;
956 956
 		global $action;
957
-		$hookmanager->initHooks(array($this->element . 'dao'));
957
+		$hookmanager->initHooks(array($this->element.'dao'));
958 958
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
959 959
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
960 960
 		if ($reshook > 0) {
Please login to merge, or discard this patch.
htdocs/ecm/class/ecmdirectory.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -987,7 +987,7 @@
 block discarded – undo
987 987
 		$result .= $linkend;
988 988
 
989 989
 		global $action;
990
-		$hookmanager->initHooks(array($this->element . 'dao'));
990
+		$hookmanager->initHooks(array($this->element.'dao'));
991 991
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
992 992
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
993 993
 		if ($reshook > 0) {
Please login to merge, or discard this patch.
htdocs/ticket/list.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1038,20 +1038,20 @@  discard block
 block discarded – undo
1038 1038
 				print $object->showOutputField($val, $key, $obj->$key, '');
1039 1039
 
1040 1040
 				// display a warning on untreated tickets
1041
-				$is_open = ($object->status != Ticket::STATUS_CLOSED && $object->status != Ticket::STATUS_CANCELED );
1041
+				$is_open = ($object->status != Ticket::STATUS_CLOSED && $object->status != Ticket::STATUS_CANCELED);
1042 1042
 				$should_show_warning = (!empty($conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE) || !empty($conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE));
1043 1043
 				if ($is_open && $should_show_warning) {
1044 1044
 					$date_last_msg_sent = (int) $object->date_last_msg_sent;
1045
-					$hour_diff = ($now - $date_last_msg_sent) / 3600 ;
1045
+					$hour_diff = ($now - $date_last_msg_sent) / 3600;
1046 1046
 
1047 1047
 					if (!empty($conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE && $date_last_msg_sent == 0)) {
1048
-						$creation_date =  $object->datec;
1049
-						$hour_diff_creation = ($now - $creation_date) / 3600 ;
1048
+						$creation_date = $object->datec;
1049
+						$hour_diff_creation = ($now - $creation_date) / 3600;
1050 1050
 						if ($hour_diff_creation > $conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE) {
1051
-							print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayForFirstResponseTooLong', $conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE), 'warning', 'style="color: red;"', false, 0, 0, '', '');
1051
+							print " ".img_picto($langs->trans('Late').' : '.$langs->trans('TicketsDelayForFirstResponseTooLong', $conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE), 'warning', 'style="color: red;"', false, 0, 0, '', '');
1052 1052
 						}
1053 1053
 					} elseif (!empty($conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE) && $hour_diff > $conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE) {
1054
-						print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayFromLastResponseTooLong', $conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE), 'warning');
1054
+						print " ".img_picto($langs->trans('Late').' : '.$langs->trans('TicketsDelayFromLastResponseTooLong', $conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE), 'warning');
1055 1055
 					}
1056 1056
 				}
1057 1057
 			} else {	// Example: key=fk_soc, obj->key=123 val=array('type'=>'integer', ...
@@ -1138,7 +1138,7 @@  discard block
 block discarded – undo
1138 1138
 
1139 1139
 print '</table>'."\n";
1140 1140
 print '</div>'."\n";
1141
-print '</div>'."\n";	// end div-responsive-inside
1141
+print '</div>'."\n"; // end div-responsive-inside
1142 1142
 
1143 1143
 print '</form>'."\n";
1144 1144
 
Please login to merge, or discard this patch.
htdocs/eventorganization/core/actions_massactions_mail.inc.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	$nbsent = 0;
74 74
 	$nbignored = 0;
75 75
 	$langs->load("mails");
76
-	include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
76
+	include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
77 77
 
78 78
 	$listofobjectid = array();
79 79
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	$oneemailperrecipient = (GETPOST('oneemailperrecipient', 'int') ? 1 : 0);
82 82
 
83 83
 	if (!$error) {
84
-		require_once DOL_DOCUMENT_ROOT . '/eventorganization/class/conferenceorboothattendee.class.php';
84
+		require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php';
85 85
 		$attendee = new ConferenceOrBoothAttendee($db);
86 86
 		$listofselectedid = array();
87 87
 		$listofselectedref = array();
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 			$sendtoid = array();
141 141
 
142 142
 			// Define $sendto
143
-			$sendto = $attendees->thirdparty->name . '<' . trim($attendees->email) . '>';
143
+			$sendto = $attendees->thirdparty->name.'<'.trim($attendees->email).'>';
144 144
 
145 145
 			// Define $sendtocc
146 146
 			$receivercc = GETPOST('receivercc', 'alphawithlgt');
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 			$reg = array();
164 164
 			$fromtype = GETPOST('fromtype');
165 165
 			if ($fromtype === 'user') {
166
-				$from = $user->getFullName($langs) . ' <' . $user->email . '>';
166
+				$from = $user->getFullName($langs).' <'.$user->email.'>';
167 167
 			} elseif ($fromtype === 'company') {
168
-				$from = $conf->global->MAIN_INFO_SOCIETE_NOM . ' <' . $conf->global->MAIN_INFO_SOCIETE_MAIL . '>';
168
+				$from = $conf->global->MAIN_INFO_SOCIETE_NOM.' <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>';
169 169
 			} elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) {
170 170
 				$tmp = explode(',', $user->email_aliases);
171 171
 				$from = trim($tmp[($reg[1] - 1)]);
@@ -173,14 +173,14 @@  discard block
 block discarded – undo
173 173
 				$tmp = explode(',', $conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES);
174 174
 				$from = trim($tmp[($reg[1] - 1)]);
175 175
 			} elseif (preg_match('/senderprofile_(\d+)_(\d+)/', $fromtype, $reg)) {
176
-				$sql = "SELECT rowid, label, email FROM " . MAIN_DB_PREFIX . "c_email_senderprofile WHERE rowid = " . (int) $reg[1];
176
+				$sql = "SELECT rowid, label, email FROM ".MAIN_DB_PREFIX."c_email_senderprofile WHERE rowid = ".(int) $reg[1];
177 177
 				$resql = $db->query($sql);
178 178
 				$obj = $db->fetch_object($resql);
179 179
 				if ($obj) {
180
-					$from = dol_string_nospecial($obj->label, ' ', array(",")) . ' <' . $obj->email . '>';
180
+					$from = dol_string_nospecial($obj->label, ' ', array(",")).' <'.$obj->email.'>';
181 181
 				}
182 182
 			} else {
183
-				$from = dol_string_nospecial(GETPOST('fromname'), ' ', array(",")) . ' <' . GETPOST('frommail') . '>';
183
+				$from = dol_string_nospecial(GETPOST('fromname'), ' ', array(",")).' <'.GETPOST('frommail').'>';
184 184
 			}
185 185
 
186 186
 			$replyto = $from;
@@ -194,16 +194,16 @@  discard block
 block discarded – undo
194 194
 			$substitutionarray = getCommonSubstitutionArray($langs, 0, null, $attendees);
195 195
 
196 196
 			if (!empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY)) {
197
-				$urlwithouturlroot = preg_replace('/' . preg_quote(DOL_URL_ROOT, '/') . '$/i', '', trim($dolibarr_main_url_root));
198
-				$urlwithroot = $urlwithouturlroot . DOL_URL_ROOT;
199
-				$url_link = $urlwithroot . '/public/agenda/agendaexport.php?format=ical' . ($conf->entity > 1 ? "&entity=" . $conf->entity : "");
200
-				$url_link .= '&exportkey=' . ($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...');
201
-				$url_link .= "&project=" . $listofselectedref[$email]->fk_project . '&module=' . urlencode('@eventorganization') . '&status=' . ConferenceOrBooth::STATUS_CONFIRMED;
202
-				$html_link = '<a href="' . $url_link . '">' . $langs->trans('DownloadICSLink') . '</a>';
197
+				$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
198
+				$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
199
+				$url_link = $urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
200
+				$url_link .= '&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...');
201
+				$url_link .= "&project=".$listofselectedref[$email]->fk_project.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED;
202
+				$html_link = '<a href="'.$url_link.'">'.$langs->trans('DownloadICSLink').'</a>';
203 203
 			}
204 204
 			$substitutionarray['__EVENTORGANIZATION_ICS_LINK__'] = $html_link;
205 205
 			$substitutionarray['__EVENTORGANIZATION_URL_LINK__'] = $url_link;
206
-			$substitutionarray['__CHECK_READ__'] = '<img src="' . DOL_MAIN_URL_ROOT . '/public/emailing/mailing-read.php?tag=' . urlencode($attendees->thirdparty->tag) . '&securitykey=' . urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY) . '" width="1" height="1" style="width:1px;height:1px" border="0"/>';
206
+			$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.urlencode($attendees->thirdparty->tag).'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
207 207
 
208 208
 			$parameters = array('mode' => 'formemail');
209 209
 
@@ -222,25 +222,25 @@  discard block
 block discarded – undo
222 222
 			}
223 223
 
224 224
 			// Send mail (substitutionarray must be done just before this)
225
-			require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
225
+			require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
226 226
 			$mailfile = new CMailFile($subjectreplaced, $sendto, $from, $messagereplaced, array(), array(), array(), $sendtocc, $sendtobcc, $deliveryreceipt, -1, '', '', "attendees_".$attendees->id, '', $sendcontext);
227 227
 			if ($mailfile->error) {
228
-				$resaction .= '<div class="error">' . $mailfile->error . '</div>';
228
+				$resaction .= '<div class="error">'.$mailfile->error.'</div>';
229 229
 			} else {
230 230
 				$result = $mailfile->sendfile();
231 231
 				if ($result) {
232
-					$resaction .= $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($from, 2), $mailfile->getValidAddress($sendto, 2)) . '<br>'; // Must not contain "
232
+					$resaction .= $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($from, 2), $mailfile->getValidAddress($sendto, 2)).'<br>'; // Must not contain "
233 233
 					$error = 0;
234 234
 
235
-					dol_syslog("Try to insert email event into agenda for objid=" . $attendees->id . " => objectobj=" . get_class($attendees));
235
+					dol_syslog("Try to insert email event into agenda for objid=".$attendees->id." => objectobj=".get_class($attendees));
236 236
 
237
-					$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
237
+					$actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto;
238 238
 					if ($message) {
239 239
 						if ($sendtocc) {
240
-							$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
240
+							$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".$sendtocc);
241 241
 						}
242
-						$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subjectreplaced);
243
-						$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
242
+						$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic').": ".$subjectreplaced);
243
+						$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody').":");
244 244
 						$actionmsg = dol_concatdesc($actionmsg, $messagereplaced);
245 245
 					}
246 246
 					$actionmsg2 = '';
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 
264 264
 						if ($error) {
265 265
 							setEventMessages($db->lasterror(), $objectobj2->errors, 'errors');
266
-							dol_syslog("Error in trigger " . $triggername . ' ' . $db->lasterror(), LOG_ERR);
266
+							dol_syslog("Error in trigger ".$triggername.' '.$db->lasterror(), LOG_ERR);
267 267
 						}
268 268
 					}
269 269
 
@@ -272,26 +272,26 @@  discard block
 block discarded – undo
272 272
 					$langs->load("other");
273 273
 					if ($mailfile->error) {
274 274
 						$resaction .= $langs->trans('ErrorFailedToSendMail', $from, $sendto);
275
-						$resaction .= '<br><div class="error">' . $mailfile->error . '</div>';
275
+						$resaction .= '<br><div class="error">'.$mailfile->error.'</div>';
276 276
 					} elseif (!empty($conf->global->MAIN_DISABLE_ALL_MAILS)) {
277 277
 						$resaction .= '<div class="warning">No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS</div>';
278 278
 					} else {
279
-						$resaction .= $langs->trans('ErrorFailedToSendMail', $from, $sendto) . '<br><div class="error">(unhandled error)</div>';
279
+						$resaction .= $langs->trans('ErrorFailedToSendMail', $from, $sendto).'<br><div class="error">(unhandled error)</div>';
280 280
 					}
281 281
 				}
282 282
 			}
283 283
 		}
284 284
 	}
285 285
 	$resaction .= ($resaction ? '<br>' : $resaction);
286
-	$resaction .= '<strong>' . $langs->trans("ResultOfMailSending") . ':</strong><br>' . "\n";
287
-	$resaction .= $langs->trans("NbSelected") . ': ' . count($toselect) . "\n<br>";
288
-	$resaction .= $langs->trans("NbIgnored") . ': ' . ($nbignored ? $nbignored : 0) . "\n<br>";
289
-	$resaction .= $langs->trans("NbSent") . ': ' . ($nbsent ? $nbsent : 0) . "\n<br>";
286
+	$resaction .= '<strong>'.$langs->trans("ResultOfMailSending").':</strong><br>'."\n";
287
+	$resaction .= $langs->trans("NbSelected").': '.count($toselect)."\n<br>";
288
+	$resaction .= $langs->trans("NbIgnored").': '.($nbignored ? $nbignored : 0)."\n<br>";
289
+	$resaction .= $langs->trans("NbSent").': '.($nbsent ? $nbsent : 0)."\n<br>";
290 290
 
291 291
 	if ($nbsent) {
292 292
 		$action = ''; // Do not show form post if there was at least one successfull sent
293 293
 		//setEventMessages($langs->trans("EMailSentToNRecipients", $nbsent.'/'.count($toselect)), null, 'mesgs');
294
-		setEventMessages($langs->trans("EMailSentForNElements", $nbsent . '/' . count($toselect)), null, 'mesgs');
294
+		setEventMessages($langs->trans("EMailSentForNElements", $nbsent.'/'.count($toselect)), null, 'mesgs');
295 295
 		setEventMessages($resaction, null, 'mesgs');
296 296
 	} else {
297 297
 		//setEventMessages($langs->trans("EMailSentToNRecipients", 0), null, 'warnings');  // May be object has no generated PDF file
Please login to merge, or discard this patch.
htdocs/core/class/doleditor.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -239,10 +239,10 @@  discard block
 block discarded – undo
239 239
                                filebrowserImageWindowWidth : \'900\',
240 240
                                filebrowserImageWindowHeight : \'500\'';
241 241
 				}
242
-				$out .= '	})'.$morejs;	// end CKEditor.replace
242
+				$out .= '	})'.$morejs; // end CKEditor.replace
243 243
 				// Show the CKEditor javascript object once loaded is ready 'For debug)
244 244
 				//$out .= '; CKEDITOR.on(\'instanceReady\', function(ck) { ck.editor.removeMenuItem(\'maximize\'); ck.editor.removeMenuItem(\'Undo\'); ck.editor.removeMenuItem(\'undo\'); console.log(ck.editor); console.log(ck.editor.toolbar[0]); }); ';
245
-				$out .= '});'."\n";	// end document.ready
245
+				$out .= '});'."\n"; // end document.ready
246 246
 				$out .= '</script>'."\n";
247 247
 			}
248 248
 		}
@@ -262,8 +262,8 @@  discard block
 block discarded – undo
262 262
 				$out .= '<script type="text/javascript">'."\n";
263 263
 				$out .= 'jQuery(document).ready(function() {'."\n";
264 264
 				$out .= '	var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid");
265
-							aceEditor.moveCursorTo('.($this->posy+1).','.$this->posx.');
266
-							aceEditor.gotoLine('.($this->posy+1).','.$this->posx.');
265
+							aceEditor.moveCursorTo('.($this->posy + 1).','.$this->posx.');
266
+							aceEditor.gotoLine('.($this->posy + 1).','.$this->posx.');
267 267
 	    	    		   	var StatusBar = window.ace.require("ace/ext/statusbar").StatusBar;									// Init status bar. Need lib ext-statusbar
268 268
 	        			   	var statusBar = new StatusBar(aceEditor, document.getElementById("statusBar'.$this->htmlname.'"));	// Init status bar. Need lib ext-statusbar
269 269
 
Please login to merge, or discard this patch.
htdocs/partnership/class/partnership_type.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 	public $label;
67 67
 
68 68
 
69
-	public $fields=array(
69
+	public $fields = array(
70 70
 		'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
71 71
 		'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>15, 'index'=>1),
72 72
 		'code' =>array('type'=>'varchar(32)', 'label'=>'Code', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20),
Please login to merge, or discard this patch.
htdocs/comm/action/index.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
 $mode = GETPOST('mode', 'aZ09');
103 103
 if (empty($mode) && preg_match('/show_/', $action)) {
104
-	$mode = $action;	// For backward compatibility
104
+	$mode = $action; // For backward compatibility
105 105
 }
106 106
 $resourceid = GETPOST("search_resourceid", "int");
107 107
 $year = GETPOST("year", "int") ?GETPOST("year", "int") : date("Y");
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 	$viewmode = $hookmanager->resPrint;
536 536
 }
537 537
 
538
-$viewmode .= '<span class="marginrightonly"></span>';	// To add a space before the navigation tools
538
+$viewmode .= '<span class="marginrightonly"></span>'; // To add a space before the navigation tools
539 539
 
540 540
 
541 541
 $newcardbutton = '';
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 	$newparam .= '&month='.((int) $month).'&year='.((int) $tmpforcreatebutton['year']).'&mode='.urlencode($mode);
547 547
 
548 548
 	//$param='month='.$monthshown.'&year='.$year;
549
-	$hourminsec = dol_print_date(dol_mktime(10, 0, 0, 1, 1, 1970, 'gmt'), '%H', 'gmt').'0000';	// Set $hourminsec to '100000' to auto set hour to 10:00 at creation
549
+	$hourminsec = dol_print_date(dol_mktime(10, 0, 0, 1, 1, 1970, 'gmt'), '%H', 'gmt').'0000'; // Set $hourminsec to '100000' to auto set hour to 10:00 at creation
550 550
 
551 551
 	$newcardbutton .= dolGetButtonTitle($langs->trans("AddAction"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : '')));
552 552
 }
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
 		// event->datep and event->datef must be GMT date.
816 816
 		if ($event->fulldayevent) {
817 817
 			$tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT');
818
-			$event->datep = $db->jdate($obj->datep, $tzforfullday ? 'tzuser' : 'tzserver');	// If saved in $tzforfullday = gmt, we must invert date to be in user tz
818
+			$event->datep = $db->jdate($obj->datep, $tzforfullday ? 'tzuser' : 'tzserver'); // If saved in $tzforfullday = gmt, we must invert date to be in user tz
819 819
 			$event->datef = $db->jdate($obj->datep2, $tzforfullday ? 'tzuser' : 'tzserver');
820 820
 		} else {
821 821
 			// Example: $obj->datep = '1970-01-01 01:00:00', jdate will return 0 if TZ of PHP server is Europe/Berlin (+1)
@@ -862,7 +862,7 @@  discard block
 block discarded – undo
862 862
 		}
863 863
 
864 864
 		// Check values
865
-		if ($event->date_end_in_calendar < $firstdaytoshow || $event->date_start_in_calendar >= $lastdaytoshow)	{
865
+		if ($event->date_end_in_calendar < $firstdaytoshow || $event->date_start_in_calendar >= $lastdaytoshow) {
866 866
 			// This record is out of visible range
867 867
 		} else {
868 868
 			if ($event->date_start_in_calendar < $firstdaytoshow) {
@@ -889,8 +889,8 @@  discard block
 block discarded – undo
889 889
 
890 890
 			// Loop on each day covered by action to prepare an index to show on calendar
891 891
 			$loop = true; $j = 0;
892
-			$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt');	// $mois, $jour, $annee has been set for user tz
893
-			$daykeyend = dol_mktime(0, 0, 0, $moisend, $jourend, $anneeend, 'gmt');	// $moisend, $jourend, $anneeend has been set for user tz
892
+			$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt'); // $mois, $jour, $annee has been set for user tz
893
+			$daykeyend = dol_mktime(0, 0, 0, $moisend, $jourend, $anneeend, 'gmt'); // $moisend, $jourend, $anneeend has been set for user tz
894 894
 			/*
895 895
 			 print 'GMT '.$event->date_start_in_calendar.' '.dol_print_date($event->date_start_in_calendar, 'dayhour', 'gmt').'<br>';
896 896
 			 print 'TZSERVER '.$event->date_start_in_calendar.' '.dol_print_date($event->date_start_in_calendar, 'dayhour', 'tzserver').'<br>';
@@ -1006,7 +1006,7 @@  discard block
 block discarded – undo
1006 1006
 
1007 1007
 if ($mode == 'show_day') {
1008 1008
 	// Request only leaves for the current selected day
1009
-	$sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin";	// date_debut and date_fin are date without time
1009
+	$sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin"; // date_debut and date_fin are date without time
1010 1010
 } elseif ($mode == 'show_week') {
1011 1011
 	// TODO: Add filter to reduce database request
1012 1012
 } elseif ($mode == 'show_month') {
@@ -1387,7 +1387,7 @@  discard block
 block discarded – undo
1387 1387
 	$theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
1388 1388
 }
1389 1389
 
1390
-$massactionbutton ='';
1390
+$massactionbutton = '';
1391 1391
 
1392 1392
 print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1, 'object_action', 0, $nav.'<span class="marginleftonly"></span>'.$newcardbutton, '', $limit, 1, 0, 1, $viewmode);
1393 1393
 
@@ -1534,7 +1534,7 @@  discard block
 block discarded – undo
1534 1534
 
1535 1535
 	for ($iter_day = 0; $iter_day < 7; $iter_day++) {
1536 1536
 		// Show days of the current week
1537
-		$curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd');		// $firstdaytoshow is in timezone of server
1537
+		$curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); // $firstdaytoshow is in timezone of server
1538 1538
 		$tmpday = dol_print_date($curtime, '%d', 'tzuserrel');
1539 1539
 		$tmpmonth = dol_print_date($curtime, '%m', 'tzuserrel');
1540 1540
 		$tmpyear = dol_print_date($curtime, '%Y', 'tzuserrel');
@@ -1749,9 +1749,9 @@  discard block
 block discarded – undo
1749 1749
 	$tmpholiday = new Holiday($db);
1750 1750
 
1751 1751
 	foreach ($eventarray as $daykey => $notused) {		// daykey is the 'YYYYMMDD' to show according to user
1752
-		$annee = dol_print_date($daykey, '%Y', 'gmt');	// We use gmt because we want the value represented by string 'YYYYMMDD'
1753
-		$mois =  dol_print_date($daykey, '%m', 'gmt');	// We use gmt because we want the value represented by string 'YYYYMMDD'
1754
-		$jour =  dol_print_date($daykey, '%d', 'gmt');	// We use gmt because we want the value represented by string 'YYYYMMDD'
1752
+		$annee = dol_print_date($daykey, '%Y', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD'
1753
+		$mois = dol_print_date($daykey, '%m', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD'
1754
+		$jour = dol_print_date($daykey, '%d', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD'
1755 1755
 
1756 1756
 		//print 'event daykey='.$daykey.' dol_print_date(daykey)='.dol_print_date($daykey, 'dayhour', 'gmt').' jour='.$jour.' mois='.$mois.' annee='.$annee."<br>\n";
1757 1757
 
@@ -1987,7 +1987,7 @@  discard block
 block discarded – undo
1987 1987
 						if ($event->type_code != 'ICALEVENT') {
1988 1988
 							$savlabel = $event->label ? $event->label : $event->libelle;
1989 1989
 							$event->label = $titletoshow;
1990
-							$event->libelle = $titletoshow;		// deprecatd
1990
+							$event->libelle = $titletoshow; // deprecatd
1991 1991
 							// Note: List of users are inside $event->userassigned. Link may be clickable depending on permissions of user.
1992 1992
 							$titletoshow = (($event->type_picto || $event->type_code) ? $event->getTypePicto() : '');
1993 1993
 							$titletoshow .= $event->getNomUrl(0, $maxnbofchar, 'cal_event cal_event_title', '', 0, 0);
Please login to merge, or discard this patch.