Completed
Branch develop (fd4d0b)
by
unknown
22:58
created
htdocs/install/repair.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 		],
259 259
 		[
260 260
 			'name' => 'force_utf8mb4_on_tables',
261
-			'info' => 'Force utf8mb4 + row=dynamic, for mysql/mariadb only' . $warning_using_utf8mb4
261
+			'info' => 'Force utf8mb4 + row=dynamic, for mysql/mariadb only'.$warning_using_utf8mb4
262 262
 		],
263 263
 		[
264 264
 			'name' => 'force_collation_from_conf_on_tables',
@@ -283,8 +283,8 @@  discard block
 block discarded – undo
283 283
 		$url_test = $_SERVER['PHP_SELF'].'?'.$option.'=test';
284 284
 		$url_confirmed = $_SERVER['PHP_SELF'].'?'.$option.'=confirmed';
285 285
 		print '<tr>';
286
-		print '<td>' . $option . '</td>';
287
-		print '<td>' . $info . '</td>';
286
+		print '<td>'.$option.'</td>';
287
+		print '<td>'.$info.'</td>';
288 288
 		print '<td class="center"><a href="'.$url_test.'" title="Launch test on option '.$option.'">test</a>'.($value == 'test' ? ' (X)' : '').'</td>';
289 289
 		print '<td class="center"><a href="'.$url_confirmed.'" title="Launch confirmed on option '.$option.'">confirmed</a>'.($value == 'confirmed' ? ' (X)' : '').'</td>';
290 290
 		print '</tr>';
@@ -1285,13 +1285,13 @@  discard block
 block discarded – undo
1285 1285
 							}
1286 1286
 							if ($key == 'js') {
1287 1287
 								$value = $obj->value;
1288
-								$valuearray = (array) json_decode($value);	// Force cast into array because sometimes it is a stdClass
1288
+								$valuearray = (array) json_decode($value); // Force cast into array because sometimes it is a stdClass
1289 1289
 								$reloffile = $valuearray[0];
1290 1290
 								$reloffile = preg_replace('/^\//', '', $valuearray[0]);
1291 1291
 							}
1292 1292
 							if ($key == 'css') {
1293 1293
 								$value = $obj->value;
1294
-								$valuearray = (array) json_decode($value);	// Force cast into array because sometimes it is a stdClass
1294
+								$valuearray = (array) json_decode($value); // Force cast into array because sometimes it is a stdClass
1295 1295
 								if ($value && (!is_array($valuearray) || count($valuearray) == 0)) {
1296 1296
 									$valuearray = array();
1297 1297
 									$valuearray[0] = $value; // If value was not a json array but a string
@@ -1307,7 +1307,7 @@  discard block
 block discarded – undo
1307 1307
 									$result = 'found'; // If error, we force like if we found to avoid any deletion
1308 1308
 								}
1309 1309
 							} else {
1310
-								$result = 'found';	//
1310
+								$result = 'found'; //
1311 1311
 							}
1312 1312
 
1313 1313
 							if (!$result) {
@@ -1882,7 +1882,7 @@  discard block
 block discarded – undo
1882 1882
 
1883 1883
 					$sql_attach = 'INSERT INTO '.MAIN_DB_PREFIX.'receptiondet_batch';
1884 1884
 					$sql_attach .= ' (fk_element, fk_product, fk_elementdet, qty, fk_entrepot, fk_user, datec, comment, status, tms, batch, eatby, sellby)';
1885
-					$sql_attach .= " VALUES (".$sql_attach_values.")";	// The string is already sanitized
1885
+					$sql_attach .= " VALUES (".$sql_attach_values.")"; // The string is already sanitized
1886 1886
 				}
1887 1887
 
1888 1888
 				if ($repair_link_dispatch_lines_supplier_order_lines == 'confirmed') {
@@ -1929,16 +1929,16 @@  discard block
 block discarded – undo
1929 1929
 
1930 1930
 // Repair llx_commande_fournisseur to eliminate duplicate reference
1931 1931
 if ($ok && GETPOST('repair_supplier_order_duplicate_ref')) {
1932
-	require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php';
1933
-	include_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
1932
+	require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
1933
+	include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
1934 1934
 
1935 1935
 	$db->begin();
1936 1936
 
1937 1937
 	$err = 0;
1938 1938
 
1939 1939
 	// Query to find all duplicate supplier orders
1940
-	$sql = "SELECT * FROM " . MAIN_DB_PREFIX . "commande_fournisseur";
1941
-	$sql .= " WHERE ref IN (SELECT cf.ref FROM " . MAIN_DB_PREFIX . "commande_fournisseur cf GROUP BY cf.ref, cf.entity HAVING COUNT(cf.rowid) > 1)";
1940
+	$sql = "SELECT * FROM ".MAIN_DB_PREFIX."commande_fournisseur";
1941
+	$sql .= " WHERE ref IN (SELECT cf.ref FROM ".MAIN_DB_PREFIX."commande_fournisseur cf GROUP BY cf.ref, cf.entity HAVING COUNT(cf.rowid) > 1)";
1942 1942
 
1943 1943
 	// Build a list of ref => []CommandeFournisseur
1944 1944
 	$duplicateSupplierOrders = [];
@@ -1964,7 +1964,7 @@  discard block
 block discarded – undo
1964 1964
 
1965 1965
 			$newRef = $supplierOrder->getNextNumRef($soc);
1966 1966
 
1967
-			$sql = "UPDATE " . MAIN_DB_PREFIX . "commande_fournisseur cf SET cf.ref = '" . $db->escape($newRef) . "' WHERE cf.rowid = " . (int) $supplierOrder->id;
1967
+			$sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur cf SET cf.ref = '".$db->escape($newRef)."' WHERE cf.rowid = ".(int) $supplierOrder->id;
1968 1968
 			if (!$db->query($sql)) {
1969 1969
 				$err++;
1970 1970
 			}
Please login to merge, or discard this patch.
htdocs/mrp/mo_list.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
58 58
 $optioncss  = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
59 59
 $mode = GETPOST('mode', 'alpha');
60
-$groupby = GETPOST('groupby', 'aZ09');	// Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut'
60
+$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut'
61 61
 
62 62
 $id = GETPOSTINT('id');
63 63
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
 //Data request for date
73 73
 $year   = GETPOST('change_dateyear', 'int');
74
-$month   = GETPOST('change_datemonth', 'int');
74
+$month = GETPOST('change_datemonth', 'int');
75 75
 $day   = GETPOST('change_dateday', 'int');
76 76
 $hour   = GETPOST('change_datehour', 'int');
77 77
 $min   = GETPOST('change_datemin', 'int');
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 $object = new Mo($db);
91 91
 $extrafields = new ExtraFields($db);
92 92
 $diroutputmassaction = $conf->mrp->dir_output.'/temp/massgeneration/'.$user->id;
93
-$hookmanager->initHooks(array($contextpage)); 	// Note that conf->hooks_modules contains array of activated contexes
93
+$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes
94 94
 
95 95
 // Fetch optionals attributes and labels
96 96
 $extrafields->fetch_name_optionals_label($object->table_element);
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
 }
631 631
 
632 632
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
633
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
633
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
634 634
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
635 635
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
636 636
 
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
 	} 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'])) {
730 730
 		$cssforfield .= ($cssforfield ? ' ' : '').'right';
731 731
 	}
732
-	$cssforfield = preg_replace('/small\s*/', '', $cssforfield);	// the 'small' css must not be used for the title label
732
+	$cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
733 733
 	if (!empty($arrayfields['t.'.$key]['checked'])) {
734 734
 		if ($key == "fk_product") {
735 735
 			print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 'p.ref', '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n";
Please login to merge, or discard this patch.
htdocs/bom/bom_list.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'bomlist'; // To manage different context of search
53 53
 $backtopage  = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
54 54
 $optioncss   = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
55
-$mode        = GETPOST('mode', 'aZ');  // mode view (kanban or common)
55
+$mode        = GETPOST('mode', 'aZ'); // mode view (kanban or common)
56 56
 
57
-$id         = GETPOSTINT('id');
57
+$id = GETPOSTINT('id');
58 58
 
59 59
 // Load variable for pagination
60 60
 $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 // Default sort order (if not yet defined by previous GETPOST)
86 86
 if (!$sortfield) {
87
-	reset($object->fields);					// Reset is required to avoid key() to return null.
87
+	reset($object->fields); // Reset is required to avoid key() to return null.
88 88
 	$sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition.
89 89
 }
90 90
 if (!$sortorder) {
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 }
549 549
 
550 550
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
551
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
551
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
552 552
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
553 553
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
554 554
 
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
 	} 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'])) {
644 644
 		$cssforfield .= ($cssforfield ? ' ' : '').'right';
645 645
 	}
646
-	$cssforfield = preg_replace('/small\s*/', '', $cssforfield);	// the 'small' css must not be used for the title label
646
+	$cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
647 647
 	if (!empty($arrayfields['t.'.$key]['checked'])) {
648 648
 		if ($key == "fk_product") {
649 649
 			print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 'p.ref', '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n";
Please login to merge, or discard this patch.
htdocs/core/lib/files.lib.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	$utf8_path = preg_replace('/([\\/]+)$/', '', $utf8_path);
122 122
 
123 123
 	if (preg_match('/\*/', $utf8_path)) {
124
-		$utf8_path_array = glob($utf8_path, GLOB_ONLYDIR);	// This scan dir for files. If file does not exists, return empty.
124
+		$utf8_path_array = glob($utf8_path, GLOB_ONLYDIR); // This scan dir for files. If file does not exists, return empty.
125 125
 		//$os_path_array = dol_dir_list($utf8_path);
126 126
 	} else {
127 127
 		$utf8_path_array = array($utf8_path);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 				'types' => $types,
140 140
 				'recursive' => $recursive,
141 141
 				'filter' => $filter,
142
-				'excludefilter' => $exclude_array,  // Already converted to array.
142
+				'excludefilter' => $exclude_array, // Already converted to array.
143 143
 				'sortcriteria' => $sortcriteria,
144 144
 				'sortorder' => $sortorder,
145 145
 				'loaddate' => $loaddate,
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 					$utf8_file = $os_file;
173 173
 				}
174 174
 
175
-				$utf8_fullpathfile = $utf8_path_cursor."/".$utf8_file;  // Temp variable for speed
175
+				$utf8_fullpathfile = $utf8_path_cursor."/".$utf8_file; // Temp variable for speed
176 176
 
177 177
 				// Check if file is qualified
178 178
 				$qualified = 1;
@@ -208,13 +208,13 @@  discard block
 block discarded – undo
208 208
 								if (is_array($filter)) {
209 209
 									$chunks = array_chunk($filter, 500);
210 210
 									foreach ($chunks as $chunk) {
211
-										$testpregmatch = preg_match('/'.implode('|', $chunk).'/i', $utf8_file);	// May failed if $filter too large
211
+										$testpregmatch = preg_match('/'.implode('|', $chunk).'/i', $utf8_file); // May failed if $filter too large
212 212
 										if ($testpregmatch) {
213 213
 											break;
214 214
 										}
215 215
 									}
216 216
 								} else {
217
-									$testpregmatch = preg_match('/'.$filter.'/i', $utf8_file);		// May failed if $filter too large
217
+									$testpregmatch = preg_match('/'.$filter.'/i', $utf8_file); // May failed if $filter too large
218 218
 								}
219 219
 								if ($testpregmatch) {
220 220
 									$qualifiedforfilter = 1;
@@ -263,13 +263,13 @@  discard block
 block discarded – undo
263 263
 							if (is_array($filter)) {
264 264
 								$chunks = array_chunk($filter, 500);
265 265
 								foreach ($chunks as $chunk) {
266
-									$testpregmatch = preg_match('/'.implode('|', $chunk).'/i', $utf8_file);	// May failed if $filter too large
266
+									$testpregmatch = preg_match('/'.implode('|', $chunk).'/i', $utf8_file); // May failed if $filter too large
267 267
 									if ($testpregmatch) {
268 268
 										break;
269 269
 									}
270 270
 								}
271 271
 							} else {
272
-								$testpregmatch = preg_match('/'.$filter.'/i', $utf8_file);		// May failed if $filter too large
272
+								$testpregmatch = preg_match('/'.$filter.'/i', $utf8_file); // May failed if $filter too large
273 273
 							}
274 274
 							if ($testpregmatch) {
275 275
 								$qualifiedforfilter = 1;
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
 	// Recursive function to copy all subdirectories and contents:
1020 1020
 	if (is_dir($ossrcfile)) {
1021 1021
 		$dir_handle = opendir($ossrcfile);
1022
-		$tmpresult = 0;  // Initialised before loop to keep old behavior, may be needed inside loop
1022
+		$tmpresult = 0; // Initialised before loop to keep old behavior, may be needed inside loop
1023 1023
 		while ($file = readdir($dir_handle)) {
1024 1024
 			if ($file != "." && $file != ".." && !is_link($ossrcfile."/".$file)) {
1025 1025
 				if (is_dir($ossrcfile."/".$file)) {
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
 					if (!empty($moreinfo) && !empty($moreinfo['gen_or_uploaded'])) {
1203 1203
 						$ecmfile->gen_or_uploaded = $moreinfo['gen_or_uploaded'];
1204 1204
 					} else {
1205
-						$ecmfile->gen_or_uploaded = 'unknown';	// 'generated', 'uploaded', 'api'
1205
+						$ecmfile->gen_or_uploaded = 'unknown'; // 'generated', 'uploaded', 'api'
1206 1206
 					}
1207 1207
 					if (!empty($moreinfo) && !empty($moreinfo['description'])) {
1208 1208
 						$ecmfile->description = $moreinfo['description']; // indexed content
@@ -1555,7 +1555,7 @@  discard block
 block discarded – undo
1555 1555
 
1556 1556
 		if ($return) {
1557 1557
 			dolChmod($file_name_osencoded);
1558
-			dol_syslog("Files.lib::dol_move_uploaded_file Success to move ".$src_file." to ".$file_name." - Umask=" . getDolGlobalString('MAIN_UMASK'), LOG_DEBUG);
1558
+			dol_syslog("Files.lib::dol_move_uploaded_file Success to move ".$src_file." to ".$file_name." - Umask=".getDolGlobalString('MAIN_UMASK'), LOG_DEBUG);
1559 1559
 			return $successcode; // Success
1560 1560
 		} else {
1561 1561
 			dol_syslog("Files.lib::dol_move_uploaded_file Failed to move ".$src_file." to ".$file_name, LOG_ERR);
@@ -1621,7 +1621,7 @@  discard block
 block discarded – undo
1621 1621
 			$ok = true;
1622 1622
 			$globencoded = str_replace('[', '\[', $file_osencoded);
1623 1623
 			$globencoded = str_replace(']', '\]', $globencoded);
1624
-			$listofdir = glob($globencoded);	// This scan dir for files. If file does not exists, return empty.
1624
+			$listofdir = glob($globencoded); // This scan dir for files. If file does not exists, return empty.
1625 1625
 
1626 1626
 			if (!empty($listofdir) && is_array($listofdir)) {
1627 1627
 				foreach ($listofdir as $filename) {
@@ -2102,7 +2102,7 @@  discard block
 block discarded – undo
2102 2102
 					$maxwidthmini = $tmparraysize['maxwidthmini'];
2103 2103
 					$maxheightmini = $tmparraysize['maxheightmini'];
2104 2104
 					//$quality = $tmparraysize['quality'];
2105
-					$quality = 50;	// For thumbs, we force quality to 50
2105
+					$quality = 50; // For thumbs, we force quality to 50
2106 2106
 
2107 2107
 					// Generate thumbs.
2108 2108
 					if ($generatethumbs) {
@@ -2296,7 +2296,7 @@  discard block
 block discarded – undo
2296 2296
 			if (isset($object->table_element)) {
2297 2297
 				$ecmfile->src_object_type = $object->table_element;
2298 2298
 			} else {
2299
-				dol_syslog('Error: object ' . get_class($object) . ' has no table_element attribute.');
2299
+				dol_syslog('Error: object '.get_class($object).' has no table_element attribute.');
2300 2300
 				return -1;
2301 2301
 			}
2302 2302
 			if (isset($object->src_object_description)) {
@@ -2593,9 +2593,9 @@  discard block
 block discarded – undo
2593 2593
 					// Skip directories (they would be added automatically)
2594 2594
 					if (!$file->isDir()) {
2595 2595
 						// Get real and relative path for current file
2596
-						$filePath = $file->getPath();				// the full path with filename using the $inputdir root.
2596
+						$filePath = $file->getPath(); // the full path with filename using the $inputdir root.
2597 2597
 						$fileName = $file->getFilename();
2598
-						$fileFullRealPath = $file->getRealPath();	// the full path with name and transformed to use real path directory.
2598
+						$fileFullRealPath = $file->getRealPath(); // the full path with name and transformed to use real path directory.
2599 2599
 
2600 2600
 						//$relativePath = substr($fileFullRealPath, strlen($rootPath) + 1);
2601 2601
 						$relativePath = substr(($filePath ? $filePath.'/' : '').$fileName, strlen($rootPath) + 1);
@@ -2867,9 +2867,9 @@  discard block
 block discarded – undo
2867 2867
 					// Skip directories (they would be added automatically)
2868 2868
 					if (!$file->isDir()) {
2869 2869
 						// Get real and relative path for current file
2870
-						$filePath = $file->getPath();				// the full path with filename using the $inputdir root.
2870
+						$filePath = $file->getPath(); // the full path with filename using the $inputdir root.
2871 2871
 						$fileName = $file->getFilename();
2872
-						$fileFullRealPath = $file->getRealPath();	// the full path with name and transformed to use real path directory.
2872
+						$fileFullRealPath = $file->getRealPath(); // the full path with name and transformed to use real path directory.
2873 2873
 
2874 2874
 						//$relativePath = ($rootdirinzip ? $rootdirinzip.'/' : '').substr($fileFullRealPath, strlen($inputdir) + 1);
2875 2875
 						$relativePath = ($rootdirinzip ? $rootdirinzip.'/' : '').substr(($filePath ? $filePath.'/' : '').$fileName, strlen($inputdir) + 1);
@@ -3978,7 +3978,7 @@  discard block
 block discarded – undo
3978 3978
 function archiveOrBackupFile($srcfile, $max_versions = 5, $archivedir = '', $suffix = "v", $moveorcopy = 'move')
3979 3979
 {
3980 3980
 	$base_file_pattern = ($archivedir ? $archivedir : dirname($srcfile)).'/'.basename($srcfile).".".$suffix;
3981
-	$files_in_directory = glob($base_file_pattern . "*");
3981
+	$files_in_directory = glob($base_file_pattern."*");
3982 3982
 
3983 3983
 	// Extract the modification timestamps for each file
3984 3984
 	$files_with_timestamps = [];
@@ -4019,7 +4019,7 @@  discard block
 block discarded – undo
4019 4019
 	}
4020 4020
 
4021 4021
 	$timestamp = dol_now('gmt');
4022
-	$new_backup = $srcfile . ".v" . $timestamp;
4022
+	$new_backup = $srcfile.".v".$timestamp;
4023 4023
 
4024 4024
 	// Move or copy the original file to the new backup with the timestamp
4025 4025
 	if ($moveorcopy == 'move') {
Please login to merge, or discard this patch.