Code Duplication    Length = 10-11 lines in 2 locations

ecrire/maj/legacy/svn10000.php 2 locations

@@ 619-629 (lines=11) @@
616
						}
617
					}
618
				}
619
				foreach ($desc['field'] as $field => $type) {
620
					if ($desc['field'][$field] !== $desc_collate[$field]) {
621
						spip_log("Conversion COLLATE table $table", "maj." . _LOG_INFO_IMPORTANTE);
622
						sql_alter("table $table change $field $field " . $desc_collate[$field]);
623
						$trouver_table('');
624
						$new_desc = $trouver_table($table);
625
						spip_log("Apres conversion $table : " . var_export($new_desc['field'], true),
626
							"maj." . _LOG_INFO_IMPORTANTE);
627
						continue 2; // inutile de continuer pour cette table : un seul alter remet tout a jour en sqlite
628
					}
629
				}
630
			}
631
		}
632
	}
@@ 759-768 (lines=10) @@
756
			$d = array_diff($desc['field'], $fields_corrected);
757
			if ($d) {
758
				spip_log("Table $table TIMESTAMP incorrect", "maj");
759
				foreach ($desc['field'] as $field => $type) {
760
					if ($desc['field'][$field] !== $fields_corrected[$field]) {
761
						spip_log("Adaptation TIMESTAMP table $table", "maj." . _LOG_INFO_IMPORTANTE);
762
						sql_alter("table $table change $field $field " . $fields_corrected[$field]);
763
						$trouver_table('');
764
						$new_desc = $trouver_table($table);
765
						spip_log("Apres conversion $table : " . var_export($new_desc['field'], true),
766
							"maj." . _LOG_INFO_IMPORTANTE);
767
					}
768
				}
769
			}
770
		}
771
	}