Completed
Branch develop (2d0c55)
by
unknown
23:19
created
htdocs/blockedlog/class/blockedlog.class.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
 			'linkedObjectsIds',
531 531
 			'linkedObjects',
532 532
 			'fk_delivery_address',
533
-			'projet',          // There is already ->fk_project
533
+			'projet', // There is already ->fk_project
534 534
 			'restrictiononfksoc',
535 535
 			'specimen',
536 536
 		);
@@ -977,18 +977,18 @@  discard block
 block discarded – undo
977 977
 		if ($resql) {
978 978
 			$obj = $this->db->fetch_object($resql);
979 979
 			if ($obj) {
980
-				$this->id 				= $obj->rowid;
981
-				$this->entity 			= $obj->entity;
980
+				$this->id = $obj->rowid;
981
+				$this->entity = $obj->entity;
982 982
 
983
-				$this->date_creation 	= $this->db->jdate($obj->date_creation);	// jdate(date_creation)is UTC
984
-				$this->date_modification = $this->db->jdate($obj->tms);				// jdate(tms) is UTC
983
+				$this->date_creation = $this->db->jdate($obj->date_creation); // jdate(date_creation)is UTC
984
+				$this->date_modification = $this->db->jdate($obj->tms); // jdate(tms) is UTC
985 985
 
986 986
 				$this->amounts			= (float) $obj->amounts;
987 987
 				$this->action 			= $obj->action;
988 988
 				$this->element			= $obj->element;
989 989
 
990 990
 				$this->fk_object = $obj->fk_object;
991
-				$this->date_object = $this->db->jdate($obj->date_object);			// jdate(date_object) is UTC
991
+				$this->date_object = $this->db->jdate($obj->date_object); // jdate(date_object) is UTC
992 992
 				$this->ref_object = $obj->ref_object;
993 993
 
994 994
 				$this->fk_user = $obj->fk_user;
@@ -1127,17 +1127,17 @@  discard block
 block discarded – undo
1127 1127
 
1128 1128
 		$this->object_version = DOL_VERSION;
1129 1129
 		// The object_format define the formatting rules into buildKeyForSignature and buildFirstPartOfKeyForSignature and buildFinalSignatureHash
1130
-		$this->object_format = 'V1';	// TODO Switch to V2 when v2 support is complete
1130
+		$this->object_format = 'V1'; // TODO Switch to V2 when v2 support is complete
1131 1131
 
1132 1132
 		try {
1133 1133
 			$previoushash = $this->getPreviousHash(1, 0); // This get last record and lock database until insert is done and transaction closed
1134 1134
 
1135
-			$concatenateddata = $this->buildKeyForSignature();	// All the information for the hash (meta data + data saved)
1135
+			$concatenateddata = $this->buildKeyForSignature(); // All the information for the hash (meta data + data saved)
1136 1136
 
1137
-			$this->signature = $this->buildFinalSignatureHash($previoushash.$concatenateddata);	// Build the hmac signature
1137
+			$this->signature = $this->buildFinalSignatureHash($previoushash.$concatenateddata); // Build the hmac signature
1138 1138
 
1139 1139
 			// For debug:
1140
-			$this->debuginfo = $this->buildFirstPartOfKeyForSignature();	// Not used
1140
+			$this->debuginfo = $this->buildFirstPartOfKeyForSignature(); // Not used
1141 1141
 		} catch (Exception $e) {
1142 1142
 			$this->error = $e->getMessage();
1143 1143
 
@@ -1168,7 +1168,7 @@  discard block
 block discarded – undo
1168 1168
 		$sql .= " fk_user,";
1169 1169
 		$sql .= " user_fullname,";
1170 1170
 		$sql .= " entity,";
1171
-		$sql .= " debuginfo";	// Only stored
1171
+		$sql .= " debuginfo"; // Only stored
1172 1172
 		$sql .= ") VALUES (";
1173 1173
 		$sql .= "'".$this->db->idate($this->date_creation)."',";
1174 1174
 		$sql .= "'".$this->db->escape($this->action)."',";
Please login to merge, or discard this patch.
htdocs/blockedlog/admin/blockedlog_archives.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 $MAXFORSHOWNLINKS = getDolGlobalInt('BLOCKEDLOG_MAX_FOR_SHOWN_LINKS', 100);
135 135
 
136 136
 $permission = $user->hasRight('blockedlog', 'read');
137
-$permissiontoadd = $user->hasRight('blockedlog', 'read');	// Permission is to upload new files to scan them
137
+$permissiontoadd = $user->hasRight('blockedlog', 'read'); // Permission is to upload new files to scan them
138 138
 $permtoedit = $permissiontoadd;
139 139
 
140 140
 $upload_dir = getMultidirOutput($block_static, 'blockedlog').'/archives';
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	$previoushash = '';
176 176
 	$firstid = '';
177 177
 
178
-	if (! (GETPOSTINT('yeartoexport') > 0)) {
178
+	if (!(GETPOSTINT('yeartoexport') > 0)) {
179 179
 		setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Year")), null, "errors");
180 180
 		$error++;
181 181
 	}
@@ -308,13 +308,13 @@  discard block
 block discarded – undo
308 308
 				$block_static->id = $obj->rowid;
309 309
 				$block_static->entity = $obj->entity;
310 310
 
311
-				$block_static->date_creation = $db->jdate($obj->date_creation);		// jdate(date_creation) is UTC
311
+				$block_static->date_creation = $db->jdate($obj->date_creation); // jdate(date_creation) is UTC
312 312
 
313
-				$block_static->amounts = (float) $obj->amounts;						// Database store value with 8 digits, we cut ending 0 them with (flow)
313
+				$block_static->amounts = (float) $obj->amounts; // Database store value with 8 digits, we cut ending 0 them with (flow)
314 314
 				$block_static->vat = $obj->vat;
315 315
 
316 316
 				$block_static->action = $obj->action;
317
-				$block_static->date_object = $db->jdate($obj->date_object);			// jdate(date_object) is UTC
317
+				$block_static->date_object = $db->jdate($obj->date_object); // jdate(date_object) is UTC
318 318
 				$block_static->ref_object = $obj->ref_object;
319 319
 
320 320
 				$block_static->user_fullname = $obj->user_fullname;
@@ -324,14 +324,14 @@  discard block
 block discarded – undo
324 324
 				// Old hash + Previous fields concatenated = signature
325 325
 				$block_static->signature = $obj->signature;
326 326
 
327
-				$block_static->element = $obj->element;								// Not in signature
328
-				$block_static->fk_object = $obj->fk_object;							// Not in signature
327
+				$block_static->element = $obj->element; // Not in signature
328
+				$block_static->fk_object = $obj->fk_object; // Not in signature
329 329
 
330
-				$block_static->fk_user = $obj->fk_user;								// Not in signature
330
+				$block_static->fk_user = $obj->fk_user; // Not in signature
331 331
 
332
-				$block_static->date_modification = $db->jdate($obj->tms);			// Not in signature
333
-				$block_static->object_version = $obj->object_version;				// Not in signature
334
-				$block_static->object_format = $obj->object_format;					// Not in signature
332
+				$block_static->date_modification = $db->jdate($obj->tms); // Not in signature
333
+				$block_static->object_version = $obj->object_version; // Not in signature
334
+				$block_static->object_format = $obj->object_format; // Not in signature
335 335
 
336 336
 				$block_static->certified = ($obj->certified == 1);
337 337
 
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 				$block_static->debuginfo = $obj->debuginfo;
342 342
 
343 343
 				//var_dump($block->id.' '.$block->signature, $block->object_data);
344
-				$checksignature = $block_static->checkSignature($previoushash); 	// If $previoushash is not defined, checkSignature will search it
344
+				$checksignature = $block_static->checkSignature($previoushash); // If $previoushash is not defined, checkSignature will search it
345 345
 
346 346
 				if ($checksignature) {
347 347
 					$statusofrecord = 'Valid';
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 				$concatenateddata = $block_static->buildKeyForSignature();
364 364
 
365 365
 				// Version archive V1=sha256
366
-				$signatureexport = dol_hash($previoushash.$concatenateddata, 'sha256');		// SHA256
366
+				$signatureexport = dol_hash($previoushash.$concatenateddata, 'sha256'); // SHA256
367 367
 				//$signatureexporthmac = 'TODO';
368 368
 
369 369
 				fwrite($fh,
Please login to merge, or discard this patch.
htdocs/blockedlog/admin/blockedlog_list.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 $search_endyear = GETPOSTINT('search_endyear');
65 65
 $search_endmonth = GETPOSTINT('search_endmonth');
66 66
 $search_endday = GETPOSTINT('search_endday');
67
-$search_id = GETPOST('search_id', 'alpha');					// Can be a USF search string
67
+$search_id = GETPOST('search_id', 'alpha'); // Can be a USF search string
68 68
 $search_fk_user = GETPOST('search_fk_user', 'intcomma');
69 69
 $search_start = -1;
70 70
 if (GETPOST('search_startyear') != '') {
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	$previoushash = '';
160 160
 	$firstid = '';
161 161
 
162
-	if (! (GETPOSTINT('yeartoexport') > 0)) {
162
+	if (!(GETPOSTINT('yeartoexport') > 0)) {
163 163
 		setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Year")), null, "errors");
164 164
 		$error++;
165 165
 	} else {
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 		}
193 193
 	}
194 194
 
195
-	if (! $error) {
195
+	if (!$error) {
196 196
 		// We record the export as a new line into the unalterable logs
197 197
 		require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
198 198
 		$b = new BlockedLog($db);
@@ -272,13 +272,13 @@  discard block
 block discarded – undo
272 272
 				$block_static->entity = $obj->entity;
273 273
 
274 274
 
275
-				$block_static->date_creation = $db->jdate($obj->date_creation);		// TODO Use gmt
275
+				$block_static->date_creation = $db->jdate($obj->date_creation); // TODO Use gmt
276 276
 
277
-				$block_static->amounts = (float) $obj->amounts;						// Database store value with 8 digits, we cut ending 0 them with (flow)
277
+				$block_static->amounts = (float) $obj->amounts; // Database store value with 8 digits, we cut ending 0 them with (flow)
278 278
 				$block_static->vat = $obj->vat;
279 279
 
280 280
 				$block_static->action = $obj->action;
281
-				$block_static->date_object = $db->jdate($obj->date_object);			// TODO Use gmt ?
281
+				$block_static->date_object = $db->jdate($obj->date_object); // TODO Use gmt ?
282 282
 				$block_static->ref_object = $obj->ref_object;
283 283
 
284 284
 				$block_static->user_fullname = $obj->user_fullname;
@@ -288,14 +288,14 @@  discard block
 block discarded – undo
288 288
 				// Old hash + Previous fields concatenated = signature
289 289
 				$block_static->signature = $obj->signature;
290 290
 
291
-				$block_static->element = $obj->element;								// Not in signature
292
-				$block_static->fk_object = $obj->fk_object;							// Not in signature
291
+				$block_static->element = $obj->element; // Not in signature
292
+				$block_static->fk_object = $obj->fk_object; // Not in signature
293 293
 
294
-				$block_static->fk_user = $obj->fk_user;								// Not in signature
294
+				$block_static->fk_user = $obj->fk_user; // Not in signature
295 295
 
296
-				$block_static->date_modification = $db->jdate($obj->tms);			// Not in signature
297
-				$block_static->object_version = $obj->object_version;				// Not in signature
298
-				$block_static->object_format = $obj->object_format;					// Not in signature
296
+				$block_static->date_modification = $db->jdate($obj->tms); // Not in signature
297
+				$block_static->object_version = $obj->object_version; // Not in signature
298
+				$block_static->object_format = $obj->object_format; // Not in signature
299 299
 
300 300
 				$block_static->certified = ($obj->certified == 1);
301 301
 
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
 			// Link to debug information object
766 766
 			if (getDolGlobalString("BLOCKEDLOG_DEBUG")) {	// If in experimental or develop mode, we add some debug information. It may help developers to find origin of bugs.
767 767
 				print '<td class="tdoverflowmax150"'.(preg_match('/<a/', $object_link) ? '' : 'title="'.dol_escape_htmltag(dol_string_nohtmltag($object_link.($object_link_title ? ' - '.$object_link_title : ''))).'"').'>';
768
-				print '<!-- object_link -->';	// $object_link can be a '<a href' link or a text
768
+				print '<!-- object_link -->'; // $object_link can be a '<a href' link or a text
769 769
 				print $object_link;
770 770
 				print '</td>';
771 771
 			}
Please login to merge, or discard this patch.