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
	}
@@ 747-756 (lines=10) @@
744
			$d = array_diff($desc['field'], $fields_corrected);
745
			if ($d) {
746
				spip_log("Table $table TIMESTAMP incorrect", "maj");
747
				foreach ($desc['field'] as $field => $type) {
748
					if ($desc['field'][$field] !== $fields_corrected[$field]) {
749
						spip_log("Adaptation TIMESTAMP table $table", "maj." . _LOG_INFO_IMPORTANTE);
750
						sql_alter("table $table change $field $field " . $fields_corrected[$field]);
751
						$trouver_table('');
752
						$new_desc = $trouver_table($table);
753
						spip_log("Apres conversion $table : " . var_export($new_desc['field'], true),
754
							"maj." . _LOG_INFO_IMPORTANTE);
755
					}
756
				}
757
			}
758
		}
759
	}