diff --git a/ecrire/exec/import_all.php b/ecrire/exec/import_all.php
index 07b276136639f0714e5744323aabbf6815d54e67..bcba8517abcf7e549653a41985968cd87a0432de 100644
--- a/ecrire/exec/import_all.php
+++ b/ecrire/exec/import_all.php
@@ -24,17 +24,18 @@ include_spip('inc/headers');
 function exec_import_all_dist()
 {
 	$archive=_request('archive');
-	if (!strlen($archive)) $archive=_request('archive_perso');
-	$request = @unserialize($GLOBALS['meta']['import_all']);
-
+	if (!strlen($archive)) {
+		$_POST['archive'] = $archive = _request('archive_perso');
+	}
 	if ($archive) {
 		$dir = import_queldir();
 		$_POST['dir'] = $dir;
 		$commentaire = verifier_sauvegarde($dir . $archive);
 		$insert = _request('insertion');
-	} elseif ($archive = isset($GLOBALS['meta']['import_all'])) {
+	} elseif (isset($GLOBALS['meta']['import_all'])) {
 		$request = @unserialize($GLOBALS['meta']['import_all']);
 		$insert = $request['insertion'];
+		$archive = $request['archive'];
 		$commentaire = '';
 	}
 	if ($archive) {
diff --git a/ecrire/inc/admin.php b/ecrire/inc/admin.php
index 9efaa4648e3ed2f93f11a70358a990860f7094d7..66808bf51ee7bc818a513327471c03e99d8e68f1 100644
--- a/ecrire/inc/admin.php
+++ b/ecrire/inc/admin.php
@@ -29,10 +29,8 @@ function inc_admin_dist($script, $titre, $comment='', $anonymous=false)
 		ecrire_meta($script, serialize($_POST));
 	} 
 
-	if  (!$anonymous) {
-		$res = admin_verifie_session($script);
-		if ($res) return $res;
-	}
+	$res = admin_verifie_session($script,$anonymous);
+	if ($res) return $res;
 	$base = charger_fonction($script, 'base');
 	$base($titre,$reprise);
 	fin_admin($script);
@@ -55,16 +53,16 @@ function inc_admin_dist($script, $titre, $comment='', $anonymous=false)
 // 	c'est que l'operation se passe mal, on la stoppe
 
 // http://doc.spip.org/@admin_verifie_session
-function admin_verifie_session($script) {
+function admin_verifie_session($script, $anonymous=false) {
 
 	include_spip('base/abstract_sql');
 	$pref = sprintf("_%d_",$GLOBALS['visiteur_session']['id_auteur']);
 	$signal = fichier_admin($script, "$script$pref");
 	$valeur = sql_getfetsel('valeur', 'spip_meta', "nom='admin'");
 	if ($valeur === NULL) {
-		ecrire_meta('admin', $signal,'non');
+		ecrire_meta('admin', $signal, 'non');
 	} else {
-		if ($valeur != $signal) {
+		if (!$anonymous AND ($valeur != $signal)) {
 			if (intval(substr($valeur, strpos($valeur,'_')+1))<>
 			    $GLOBALS['visiteur_session']['id_auteur']) {
 				include_spip('inc/minipres');