diff --git a/.gitattributes b/.gitattributes
index ae1785b7e59d53621150cdc8f27067289fd28946..3c19022fb189230c023d6b17c7daa167802ce1a7 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -293,6 +293,7 @@ ecrire/inc_export_all.php -text
 ecrire/inc_forum_admin.php -text
 ecrire/inc_forum_envoi.php -text
 ecrire/inc_headers.php -text
+ecrire/inc_import_all.php -text
 ecrire/inc_install.php -text
 ecrire/inc_js_menu_rubriques.php -text
 ecrire/inc_lang_liste.php -text
diff --git a/ecrire/import_all.php3 b/ecrire/import_all.php3
index bd166dffb29af5852b7134afb524323f00414bed..9540eeeaa13b231f0c6f62f06edc2ac2aee07b75 100644
--- a/ecrire/import_all.php3
+++ b/ecrire/import_all.php3
@@ -10,52 +10,8 @@
  *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
 \***************************************************************************/
 
-
 $reinstall = 'non';
 include ("inc.php3");
-
-include_ecrire ("inc_import.php3");
-include_ecrire("inc_texte.php3");
-
-function verifier_version_sauvegarde ($archive) {
-	global $spip_version;
-	global $flag_gz;
-
-	$ok = @file_exists(_DIR_SESSIONS . $archive);
-	$gz = $flag_gz;
-	$_fopen = ($gz) ? gzopen : fopen;
-	$_fread = ($gz) ? gzread : fread;
-	$buf_len = 1024; // la version doit etre dans le premier ko
-
-	if ($ok) {
-		$f = $_fopen(_DIR_SESSIONS . $archive, "rb");
-		$buf = $_fread($f, $buf_len);
-
-		if (ereg("<SPIP [^>]* version_base=\"([0-9\.]+)\" ", $buf, $regs)
-			AND $regs[1] == $spip_version)
-			return false; // c'est bon
-		else
-			return _T('avis_erreur_version_archive', array('archive' => $archive));
-	} else
-		return _T('avis_probleme_archive', array('archive' => $archive));
-}
-
-if ($archive) {
-	$action = _T('info_restauration_sauvegarde', array('archive' => $archive));
-	$commentaire = verifier_version_sauvegarde ($archive);
-}
-
-debut_admin($action, $commentaire);
-
-
-$archive = _DIR_SESSIONS . $archive;
-
-ecrire_meta("debut_restauration", "debut");
-ecrire_meta("fichier_restauration", $archive);
-ecrire_meta("status_restauration", "0");
-ecrire_metas();
-
-fin_admin($action);
-
-redirige_par_entete("index.php3");
+$var_f = include_fonction(basename($SCRIPT_NAME, _EXTENSION_PHP));
+$var_f();
 ?>
diff --git a/ecrire/inc_admin.php3 b/ecrire/inc_admin.php3
index 2711fd21d776fe3bc1c16c9340d2c867bfdb5d27..62cf295dfc2330e55ae62b7c98036e52a462faed 100644
--- a/ecrire/inc_admin.php3
+++ b/ecrire/inc_admin.php3
@@ -24,7 +24,7 @@ function debut_admin($action, $commentaire='') {
 	global $connect_statut;
 
 	if ((!$action) || ($connect_statut != "0minirezo")) {
-		include_ecrire ("inc_minipre.php3");
+		include_ecrire ("inc_minipres.php");
 		install_debut_html(_T('info_acces_refuse'));install_fin_html();
 		exit;
 	}
@@ -35,6 +35,7 @@ function debut_admin($action, $commentaire='') {
 	}
 
 	include_ecrire ("inc_minipres.php");
+	include_ecrire ("inc_texte.php3");
 	install_debut_html(_T('info_action', array('action' => $action)));
 
 	if ($commentaire) {
diff --git a/ecrire/inc_import_all.php b/ecrire/inc_import_all.php
new file mode 100644
index 0000000000000000000000000000000000000000..f6f3667ecaccd49d6aa497b64528ab4d22aed8a0
--- /dev/null
+++ b/ecrire/inc_import_all.php
@@ -0,0 +1,58 @@
+<?php
+
+/***************************************************************************\
+ *  SPIP, Systeme de publication pour l'internet                           *
+ *                                                                         *
+ *  Copyright (c) 2001-2005                                                *
+ *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
+ *                                                                         *
+ *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
+ *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
+\***************************************************************************/
+
+function verifier_version_sauvegarde ($archive) {
+	global $spip_version;
+	global $flag_gz;
+
+	$ok = @file_exists(_DIR_SESSIONS . $archive);
+	$gz = $flag_gz;
+	$_fopen = ($gz) ? gzopen : fopen;
+	$_fread = ($gz) ? gzread : fread;
+	$buf_len = 1024; // la version doit etre dans le premier ko
+
+	if ($ok) {
+		$f = $_fopen(_DIR_SESSIONS . $archive, "rb");
+		$buf = $_fread($f, $buf_len);
+
+		if (ereg("<SPIP [^>]* version_base=\"([0-9\.]+)\" ", $buf, $regs)
+			AND $regs[1] == $spip_version)
+			return false; // c'est bon
+		else
+			return _T('avis_erreur_version_archive', array('archive' => $archive));
+	} else
+		return _T('avis_probleme_archive', array('archive' => $archive));
+}
+
+function import_all_dist()
+{
+  global $archive;
+  if ($archive) {
+	$action = _T('info_restauration_sauvegarde', array('archive' => $archive));
+	$commentaire = verifier_version_sauvegarde ($archive);
+}
+
+  debut_admin($action, $commentaire);
+
+
+  $archive = _DIR_SESSIONS . $archive;
+
+  ecrire_meta("debut_restauration", "debut");
+  ecrire_meta("fichier_restauration", $archive);
+  ecrire_meta("status_restauration", "0");
+  ecrire_metas();
+  
+  fin_admin($action);
+
+  header("Location: ./");
+}
+?>