Index: /extensions/set_plugins/admin.php
===================================================================
--- /extensions/set_plugins/admin.php	(revision 11483)
+++ /extensions/set_plugins/admin.php	(revision 11484)
@@ -1,4 +1,5 @@
 <?php
 // Chech whether we are indeed included by Piwigo.
+
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     if (PHPWG_VERSION < 2.3 ) 
Index: /extensions/set_plugins/include/affiche.php
===================================================================
--- /extensions/set_plugins/include/affiche.php	(revision 11483)
+++ /extensions/set_plugins/include/affiche.php	(revision 11484)
@@ -10,6 +10,13 @@
 if (isset($conf['set_plugins'])) $set_plugins_parametres =  unserialize($conf['set_plugins']);
   $nb=set_plugins::set_var('nb','10');
+  
+  $plugins = new plugins();
+  $plugins->sort_fs_plugins('name');
+  //$plugins->get_incompatible_plugins();
+  $redirect_url = get_root_url().'admin.php?page='.$_GET['page'];
+  $base_url = get_root_url().'admin.php?page='.$page['page'];
+  $action_url = $base_url.'&amp;plugin='.'%s'.'&amp;pwg_token='.get_pwg_token();
 
-  $liste = set_plugins::set_var('list',array()); 
+  $liste = set_plugins::set_var('liste',array()); 
    if (isset($liste[0]) && is_array($liste[0]))
             $liste = array();
@@ -27,57 +34,31 @@
      $set="false";
 }
-
-$dir=realpath('./local/plugins/set_plugins');
- if (!is_dir($dir)){    
-    $dir= realpath('./local/plugins'). "\\set_plugins";
-    $umask = umask(0);
-    $mkd = @mkdir($dir, 0755, true );
-    umask($umask);
-    if ($mkd==false){
-      fatal_error( "$dir ".l10n('no write access'));       
-    } 
-    $file = $dir.'\\.htaccess';
-    @file_put_contents( $file, 'allow from all' );
- }   
-$dir=realpath('./local/plugins/set_plugins');
-if(!isset($edited_file) || $edited_file=="") 
- $edited_file=$dir."/config.txt";
- $edited_file=str_replace("\\","/", $edited_file);
-
+global  $edited_file;
  if (isset($_POST['submit']) && $_POST['submit']==l10n('save_file')){
-    if (file_exists($edited_file)){
-        copy($edited_file, substr_replace($edited_file, '.bak', strrpos($edited_file , '.'), 0) );
-       
-   
-      }
-     if ($file = @fopen($edited_file , "w")) {
-          $liste= array_unique($liste);
-          @fwrite($file , serialize($liste));
-          @fclose($file);
-          $infos_message.=l10n("save config").set_plugins::memo_var($liste);
-          $infos_message.=set_plugins::memo_var($liste);
-          $infos_message.=set_plugins::memo_var($_POST);
-          unset($_POST['submit']);
-      }
-
+  set_plugins::save_to_file($liste);
  }
 
 ///================================================================  
-if (isset($_POST['restore'])){ 
-  $content_file = file_get_contents(substr_replace($edited_file, '.bak', strrpos($edited_file , '.'), 0));
-  $file =array();
-  $liste= array_unique(unserialize($content_file));
-  unset($_POST['restore']);
+if (isset($_POST['restore']) ){ 
+$liste=set_plugins::restore_from_file();
 }
 
 
-if(isset($_POST['add_plugins']) && $add_plugins!="" ){ 
-$liste= array_unique($liste);
+if($add_plugins!=""  ){ 
+ 
+$infos_message .=$add_plugins;
  if(!array_search($add_plugins, $liste)){ 
   array_push($liste,  $add_plugins );
  }
-  $add_plugins="";
-  unset( $_POST['add_plugins']);
+ // $add_plugins="";
+ // unset( $_POST['add_plugins']);
 }
+if (isset($liste_des_plugins))
+foreach($liste_des_plugins as $plugin_id) {  
+if(!array_search($plugin_id, $liste)){ 
+  array_push($liste,  $plugin_id );
+ }
+}
+if(count($liste)>0) $liste= array_unique($liste);
 
 if(count($liste )>0)   
@@ -88,16 +69,9 @@
     unset($_POST['list_visible']);
     unset($_POST['nb']);
- }
- 
- 
-                
-  $plugins = new plugins();
-  $plugins->sort_fs_plugins('name');
-  //$plugins->get_incompatible_plugins();
-  $redirect_url = get_root_url().'admin.php?page='.$_GET['page'];
-  $base_url = get_root_url().'admin.php?page='.$page['page'];
-  $action_url = $base_url.'&amp;plugin='.'%s'.'&amp;pwg_token='.get_pwg_token();
+ }  
+
+
+
  //=======================================================
-
  if($liste)  $liste_plugins = array_combine($liste,$liste);
  else $liste_plugins =array();
@@ -112,8 +86,9 @@
     if ($key!== false){
     if(isset( $plugins->db_plugins_by_id[$plugin_id])){
+    $State_id=$plugins->db_plugins_by_id[$plugin_id]['state'] ;
       $tpl_plugin = array(
         'NAME' => $fs_plugin['name'],
         'U_ACTION' => sprintf($action_url, $plugin_id),        
-        'STATE' => $plugins->db_plugins_by_id[$plugin_id]['state']
+        'STATE' =>$State_id
       );
       $liste_tpl[$plugin_id]=  $tpl_plugin ;   
@@ -124,6 +99,8 @@
 }           
 $template->assign( array(  'liste_plugins' => $liste_tpl));	  
+$edited_file=set_plugins::get_file_name();
 
- $template->assign( array(   'PHPWG_VERSION' =>  PHPWG_VERSION ,
+ $template->assign( array(   
+                    'PHPWG_VERSION' =>  PHPWG_VERSION ,
                     'cl_plugins' => $cl_set_plugins_plugin ,
                     'cl_version' => $cl_set_plugins_plugin['version'] ,
@@ -139,5 +116,5 @@
                     'nb_list' => count($liste),
                     'nb_plugins' => count($plugins->db_plugins_by_id) ,
-                    'restore' => false ,
+                    'restore' => (file_exists($edited_file)) ,
                     'edited_file' => $edited_file
 											)
@@ -145,3 +122,4 @@
                     
 
+
 ?>
Index: /extensions/set_plugins/js/field_set.js
===================================================================
--- /extensions/set_plugins/js/field_set.js	(revision 11483)
+++ /extensions/set_plugins/js/field_set.js	(revision 11484)
@@ -3,23 +3,8 @@
  // jQuery("#form_set_plugins").submit();
 }
-
-
 jQuery().ready(function () {
   jQuery('.cluetip').tipTip({  maxWidth:'600px' ,'delay': 0, 'fadeIn': 200, 'fadeOut': 200 });  
-  jQuery('.cluetip0').cluetip({ 
-    width: 300,
-    splitTitle: '|'    ,
-    clickThrough: true
-  });
-
-
-
-
-});
-
-
-
-
-
+ 
+});  var post = {};
 jQuery("fieldset").hide();
 jQuery(document).ready(function () {
@@ -27,5 +12,4 @@
     // jQuery("#form_set_plugins").submit();
   });
-
   if (typeof plus_path == "undefined") {
     var plus_path = './plugins/set_plugins/js/icon/plus.png';
@@ -33,6 +17,18 @@
   }
   var h_min = 0;
-  var liste_des_plugins = {};
-  jQuery(window).load(function () {
+  var liste_des_plugins = new Array();
+
+  jQuery(window).load(function (event) {
+    n = post;
+    var link = event.target.location.href;
+    if (link.indexOf("?") != -1) {
+      link = link.replace(/\"/ig, "");
+      var query = link.split("?")[1];
+      eval("query = {" + query.replace(/&/ig, "\",").replace(/=/ig, ":\"") + "\"};");
+    }
+
+    if (query.plugin)
+      jQuery('#add_plugins').val(query.plugin);
+
     if (jQuery(".titrePage").length >= 1) {
       if (jQuery("span.sort").length >= 1)
@@ -119,21 +115,28 @@
             jQuery("input[name=list_visible]").val(val);
             jQuery('#set').val("true");
-
-            jQuery.ajax({
-              type: "POST",
-              async: true,
-              data: { list_visible: val, set: "true" },
-              success: function (msg) {
-                // jQuery("#form_set_plugins").submit();
-              }
-            });
-
           }); // click
 
 
-        }); //each
+        }); //each fieldset 
+      //==========================================================
+
+
+
+
+      //=========================================================
+
       var liste_action = { active: "", deactive: "" };
+      jQuery("input[name=list_visible]").val(liste.join(","));
+      jQuery("fieldset").show();
+    } // fielset
+    //====================================================================
+    jQuery(".plugin_list").each(function (i) {
+      liste_des_plugins.push(jQuery(this).attr('id'));
+    }
 
-      jQuery(".pluginBox a").each(
+    )
+
+    //==============================================================
+    jQuery("input").each(
         function (i) {
           jQuery(this).click(function (event) {
@@ -143,29 +146,5 @@
 
         }); //each
-      jQuery("input[name=list_visible]").val(liste.join(","));
-      jQuery("fieldset").show();
-    } // fielset
-    //====================================================================
 
-    jQuery("input").each(
-        function (i) {
-          jQuery(this).click(function (event) {
-            jQuery(this).css("color", "red");
-            jQuery('#set').val("true");
-            jQuery.ajax({
-              type: "POST",
-              async: true,
-              data: {
-                set: "true"
-              }
-           ,
-              success: function (data) {
-                //  jQuery("#form_set_plugins").submit();
-
-              }
-            });
-          }); // click
-
-        }); //each
     jQuery(".pluginBox a").click(function (event) {
       var link = event.target.href;
@@ -175,19 +154,35 @@
         jQuery('#add_plugins').val(query.plugin);
         jQuery('#set').val("true");
+        n = query.pwg_token;
+        action = query.action;
         val = liste.join(",");
+        val2 = liste_des_plugins.join(",");
+        jQuery.ajax({
+          method: 'GET',
+          // url: get_post,
+          data: { get_post: get_post,
+            liste_des_plugins: true,
+            liste: val,
+            add_plugins: query.plugin,
+            set: "true",
+            action: query.action
+          },
+           async: false,
+          dataType: 'json',
+          success: function (data) {
+            n = eval(data);
+            jQuery("#titrePage").after(
+          '<img alt = "" width="50px" title = ""' +
+          'src = "themes/default/images/colorbox-loading.gif"' + '>&nbsp;'
+        );
 
-        jQuery.ajax({
-          type: "POST",
-          async: true,
-          data: { add_plugins: query.plugin,
-            set: "true",
-            list_visible: val
-          }
-           ,
-          success: function (data) {
-            //  jQuery("#form_set_plugins").submit();
 
+            liste_des_plugins = data;
+            n = data;
           }
         });
+
+
+        /* */
 
       }
@@ -196,4 +191,4 @@
 
   }); // load
-});                                                                //ready           
+});                                                                                  //ready           
            
Index: /extensions/set_plugins/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/set_plugins/language/fr_FR/plugin.lang.php	(revision 11483)
+++ /extensions/set_plugins/language/fr_FR/plugin.lang.php	(revision 11484)
@@ -18,5 +18,5 @@
 $lang['s_pl_action6']="Nombre d'extensions à modifier.";
 $lang['s_pl_action7']="Mémorisation des extensions actives";
-$lang['s_pl_action8']="Sauvegarde de la liste des extensions installées";
+$lang['s_pl_action8']="Sauvegarde de la liste des extensions mémorisées";
 $lang['s_pl_action9']="Restitue la liste des extensions mémorisées";
 
Index: /extensions/set_plugins/main.inc.php
===================================================================
--- /extensions/set_plugins/main.inc.php	(revision 11483)
+++ /extensions/set_plugins/main.inc.php	(revision 11484)
@@ -31,10 +31,13 @@
      $erreur_message = "";
      $infos_warning = "";
+$liste_active_plugins;
 // Add an entry to the 'Plugins' menu.
 add_event_handler('get_admin_plugin_menu_links', array(&$set_plugins,'set_plugins_admin_menu')  );
-add_event_handler('loc_end_admin', array(&$set_plugins,'cl_affiche_messages_admin'));
-add_event_handler('loc_end_page_header',array(&$set_plugins,'set_plugins_add')); 
+add_event_handler('loc_end_admin', array(&$set_plugins,'messages_admin'),50); // affichege infos
+
+add_event_handler('loc_end_page_header', array(&$set_plugins,'begin_admin'),EVENT_HANDLER_PRIORITY_NEUTRAL );	
+add_event_handler('loc_end_page_header',array(&$set_plugins,'set_plugins_add'),EVENT_HANDLER_PRIORITY_NEUTRAL+1 );	
 
  //=======================================================
-
+ 
 ?>
Index: /extensions/set_plugins/maintain.inc.php
===================================================================
--- /extensions/set_plugins/maintain.inc.php	(revision 11483)
+++ /extensions/set_plugins/maintain.inc.php	(revision 11484)
@@ -35,5 +35,5 @@
 
 $nb=set_plugins::set_var('nb','10');
-$liste = set_plugins::set_var('list',array()); 
+$liste = set_plugins::set_var('liste',array()); 
 $state=set_plugins::set_var('state',"active"); 
 $list_visible=set_plugins::set_var('list_visible',"on,on,on,on"); 
Index: /extensions/set_plugins/set_plugins_class.php
===================================================================
--- /extensions/set_plugins/set_plugins_class.php	(revision 11483)
+++ /extensions/set_plugins/set_plugins_class.php	(revision 11484)
@@ -14,12 +14,44 @@
   }
   //============================================================================
+  function begin_admin() {
+  global $erreur_message,$liste_des_plugins,$liste_active_plugins,$page;  
+      //========= Liste des plugins actifs =================
+     
+
+if (!isset($page['body_id'])) return;
+if($page['body_id']!='theAdminPage' ) return ;
+if($page['page']=='plugins_list' || $page['page']=='plugins'){
+          
+         
+
+      $plugins = new plugins();
+      $plugins->sort_fs_plugins('name');
+      $liste_des_plugins = array();
+  foreach ($plugins->fs_plugins as $plugin_id => $fs_plugin){
+      if(isset( $plugins->db_plugins_by_id[$plugin_id])){
+        $State_id=$plugins->db_plugins_by_id[$plugin_id]['state'] ;
+        if($State_id=="active" && $plugin_id!="set_plugins")
+          array_push($liste_des_plugins,$plugin_id);
+     }      
+  }
+
+if (isset($_GET['liste_des_plugins'])){  
+ array_push($liste_des_plugins,$_GET);
+    echo json_encode($liste_des_plugins);
+   exit;
+}
+$liste_active_plugins=$liste_des_plugins;
+   }
+  }
+  //============================================================================
   function set_plugins_add() {
-    global $user, $template, $val,$page,$conf;
+    global $user, $template, $val,$page,$conf,$erreur_message,$infos_message;
+    global $liste_des_plugins,$liste_active_plugins;
     if (!isset($page['body_id'])) return;
-    if (!isset($page['body_id'])) return;
+
     switch($page['body_id']){
         case  'theAdminPage':
         switch($page['page']){
-              case 'plugins_list':
+           case 'plugins_list':
               if(!isset($template)) return ;
                 set_plugins::Affiche_set_plugins();
@@ -34,5 +66,5 @@
   }
 //============================================================================
-  function cl_affiche_messages_admin(){
+  function messages_admin(){
     global $template,$page, $template, $pwg_loaded_plugins,$infos_message,$erreur_message,$infos_warning;
    
@@ -86,5 +118,5 @@
                   'list_visible' => $list_visible,
                   'state' => $state,
-                  'list'=>$liste,
+                  'liste'=>$liste,
                   'nb' =>$nb
               );
@@ -107,9 +139,12 @@
   //===================================================================
 function Affiche_set_plugins(){
+global $infos_message,$liste_des_plugins,$erreur_message ;
+
   include_once(SET_PLUGINS_PATH."include/constants.php");
-  include(SET_PLUGINS_PATH.'include/affiche.php');
-  $all_tpl_vars = $template->get_template_vars('plugins');
+   include(SET_PLUGINS_PATH.'include/affiche.php');
+   $all_tpl_vars = $template->get_template_vars('plugins');
   if(!$all_tpl_vars)  return;
-  if( $set=="true" ){
+
+  if( $set=="true" ){     
     $state="";
     if(isset($_POST['unset_plugins'])  )
@@ -122,4 +157,5 @@
       else
           $sens="ASC";
+            $infos_message .="-----> $state $sens<br />";
       //============================
       $query = 'SELECT *
@@ -172,28 +208,18 @@
 
     } 
-    
-
-
    if(isset($result) && $result==true){
-      $redirect_url = get_root_url().'admin.php?page='.$_GET['page'];
-      //$infos_message .="-----> Mise à jour : " . $nb."<br />";
-      //$infos_message .="Liste Avant: " . set_plugins::memo_var($liste);
+      $redirect_url = get_root_url().'admin.php?page='.$_GET['page'];   
       set_plugins::save_config();
-
       $_POST['set']="";
       $set="";
       include(SET_PLUGINS_PATH.'include/affiche.php');
-
      // redirect($redirect_url);
     }
-      //
-
-
+     
   }
   $template->set_filenames(
     array(    'cl_plugin' => SET_PLUGINS_PATH_ABS.'template/admin.tpl'  )
   );
-   
-   
+
   //===========================================================
   $header_1='<div id="titrePage">
@@ -208,4 +234,50 @@
 }
 
+//========================================
+function save_to_file($liste){
+global $infos_message;
+$edited_file=set_plugins::get_file_name();
+  if (file_exists($edited_file)){
+        copy($edited_file, substr_replace($edited_file, '.bak', strrpos($edited_file , '.'), 0) );
+   }
+     if ($file = @fopen($edited_file , "w")) {
+          $liste= array_unique($liste);
+          @fwrite($file , serialize($liste));
+          @fclose($file);
+          $infos_message.=l10n("save config").set_plugins::memo_var($edited_file);          
+          unset($_POST['submit']);
+      }
+}
+//==============================================
+function restore_from_file(){
+  global $infos_message;
+  $edited_file=set_plugins::get_file_name();
+  $content_file = file_get_contents($edited_file);
+  $file =array();
+  $liste= array_unique(unserialize($content_file));
+  unset($_POST['restore']);
+}
+//===============================================
+function get_file_name(){
+global  $edited_file;
+  $dir=realpath('./local/plugins/set_plugins');
+  if (!is_dir($dir)){    
+    $dir= realpath('./local/plugins'). "\\set_plugins";
+    $umask = umask(0);
+    $mkd = @mkdir($dir, 0755, true );
+    umask($umask);
+    if ($mkd==false){
+      fatal_error( "$dir ".l10n('no write access'));       
+    } 
+    $file = $dir.'\\.htaccess';
+    @file_put_contents( $file, 'allow from all' );
+  }   
+  $dir=realpath('./local/plugins/set_plugins');
+  if(!isset($edited_file) || $edited_file=="") 
+  $edited_file=$dir."/config.txt";
+  $edited_file=str_replace("\\","/", $edited_file);
+  return $edited_file ;
+}
+
 
 }// fin classe
Index: /extensions/set_plugins/template/admin.tpl
===================================================================
--- /extensions/set_plugins/template/admin.tpl	(revision 11483)
+++ /extensions/set_plugins/template/admin.tpl	(revision 11484)
@@ -8,18 +8,8 @@
 {include file= $SET_PLUGINS_PATH_ABS|@cat:'template/header_2_2.tpl'} 
 {/if}
-
-
 {/html_head}
 
-
-
-{*if isset($liste_plugins)*}
-
 <fieldset >
-<legend class="cluetip" title="{'s_pl_action'|@translate}"
-
-       
->
-  
+<legend class="cluetip" title="{'s_pl_action'|@translate}"  >  
     {if $state == 'active'} 
     {'Last'|@translate} {'action'|@translate} :{'Activate'|@translate}
@@ -27,5 +17,4 @@
     {'Last'|@translate} {'action'|@translate} :{'Inactivate'|@translate}
     {/if} 
-
   {foreach from=$liste_plugins item=plugin name=plugins_name} 
   {if $smarty.foreach.plugins_name.first}
@@ -36,32 +25,21 @@
       <label class="cluetip" title="{'s_pl_action3'|@translate}">
       {$smarty.foreach.plugins_loop.total}</label>] </legend>
-
 <form action="{$action}" method="post" name="form_set_plugins" id="form_set_plugins"> 
-  <input   name="unset_plugins" type="submit" value="{'Deactivate'|@translate}"
-    class="cluetip button" title="{'s_pl_action4'|@translate}" />
-  <input   name="set_plugins" type="submit" value="{'Activate'|@translate}"
-    class="cluetip" title="{'s_pl_action5'|@translate}" />   
-
+  <input   name="unset_plugins" type="submit" value="{'Deactivate'|@translate}" class="cluetip button" title="{'s_pl_action4'|@translate}" />
+  <input   name="set_plugins" type="submit" value="{'Activate'|@translate}" class="cluetip" title="{'s_pl_action5'|@translate}" />   
   <label class="cluetip" title="{'s_pl_action6'|@translate}"> {'nb'|@translate}:</label>
   <input name="nb" type="text" value="{$nb}" size="5" />
-
   <input name="list_visible" id="list_visible" type="hidden" value="{$list_visible}" />    
   <input name="add_plugins" type="hidden" id="add_plugins" value="{$add_plugins}" />
-
-  <input type="submit" name="init_plugins" class="cluetip" 
-  title="{'s_pl_action7'|@translate}"
-    value="{'store'|@translate}" />
+  <input type="submit" name="init_plugins" class="cluetip"  title="{'s_pl_action7'|@translate}" value="{'store'|@translate}" />
   <input type="hidden" id="set" name="set" value="{$set}" />
-
-      <input class="cluetip" title="{'s_pl_action8'|@translate}  {$edited_file}" type="submit"
-        value="{'save_file'|@translate}" name="submit" />
-      {if isset ($restore)}
-      <input class="cluetip" title="{'s_pl_action9'|@translate}  {$edited_file}" type="submit"
-        value="{'restore'|@translate}" name="restore" onclick="return confirm('{'restore_confirm'|@translate|escape:'javascript'}');" />
-      {/if}
+  <input class="cluetip" title="{'s_pl_action8'|@translate}  {$edited_file}" type="submit"       value="{'save_file'|@translate}" name="submit" />
+  {if $restore}
+  <input class="cluetip" title="{'s_pl_action9'|@translate}  {$edited_file}" type="submit"
+  value="{'restore'|@translate}" name="restore" onclick="return confirm('{'restore_confirm'|@translate|escape:'javascript'}');" />
+  {/if}
  <p>
 {/if}
-
-      <div class="pluginBox" id="{$plugin.NAME}">
+   <div class="pluginBox plugin_list" id="{$plugin.NAME}">
  <table width="100%"  >    <tr>
 <td width="50%" align="left" name="plugins_name" rel="actif" class="pluginBoxNameCell" >
@@ -101,15 +79,21 @@
  {if $smarty.foreach.plugins_name.total==0}
   [{$smarty.foreach.plugins_name.total}/{$nb_plugins}]
-
    </legend>
    <form action="{$action}" method="post" name="form_set_plugins" id="form1">
-   <input class="button" name="unset_plugins" type="submit" value="{'Deactivate'|@translate}" />
-   <input class="button" name="set_plugins" type="submit" value="{'Activate'|@translate}" />
-   <label>
-     {'nb'|@translate}:</label><input name="nb" type="text" value="{$nb}" size="5" />
+   <input name="unset_plugins" type="submit" value="{'Deactivate'|@translate}" class="cluetip button"
+     title="{'s_pl_action4'|@translate}" />
+   <input name="set_plugins" type="submit" value="{'Activate'|@translate}" class="cluetip"
+     title="{'s_pl_action5'|@translate}" />
+   <label class="cluetip" title="{'s_pl_action6'|@translate}">
+     {'nb'|@translate}:</label>
+   <input name="nb" type="text" value="{$nb}" size="5" />
    <input name="list_visible" id="Hidden1" type="hidden" value="{$list_visible}" />
-   <input name="add_plugins" type="hidden" id="Hidden2" value="{$add_plugins}" />
-   <input class="button" type="submit" name="init_plugins" value="{'init'|@translate}" />
+   <input name="add_plugins" type="hidden" id="add_plugins" value="{$add_plugins}" />
+   <input type="submit" name="init_plugins" class="cluetip" title="{'s_pl_action7'|@translate}" value="{'store'|@translate}" />
    <input type="hidden" id="Hidden3" name="set" value="{$set}" />
+   <input class="cluetip" title="{'s_pl_action8'|@translate}  {$edited_file}" type="submit" value="{'save_file'|@translate}" name="submit" />
+   {if $restore}
+   <input class="cluetip" title="{'s_pl_action9'|@translate}  {$edited_file}" type="submit" value="{'restore'|@translate}" name="restore" onclick="return confirm('{'restore_confirm'|@translate|escape:'javascript'}');" />
+   {/if}
    <p>
      {/if}
@@ -117,5 +101,29 @@
       </form>
   </fieldset>
-{*/if*}
+{*/if*} 
 
-
+{footer_script} 
+var root = '{$SET_PLUGINS_PATH}';
+ var get_post = "{$SET_PLUGINS_PATH}include/set_post.php";
+var list_visible = '{$list_visible}';
+ var nb = '{$nb}'; 
+ {if $liste_plugins} 
+ liste_plugins=new Array(); 
+ {foreach from=$liste_plugins item=plugin name=plugins_name} 
+ 
+  liste_plugins.push('{$plugin.NAME}') ;
+ {/foreach}
+  {else} 
+  var liste_plugins = new Array(); 
+  {/if} 
+  {literal} 
+  jQuery(document).ready(function() { 
+  jQuery.ajax({ method: 'POST',
+url: get_post,
+ data: { root:root,list_visible:list_visible,nb:nb },
+  dataType: 'json',
+success: function(data) {
+ n=data; 
+ } });
+  });
+   {/literal}{/footer_script}
