Index: /extensions/set_plugins/set_plugins_class.php
===================================================================
--- /extensions/set_plugins/set_plugins_class.php	(revision 11385)
+++ /extensions/set_plugins/set_plugins_class.php	(revision 11386)
@@ -1,5 +1,5 @@
-﻿<?php 
+<?php
 /***************************************************************************/
-class set_plugins_controler  { 
+class set_plugins_controler  {
   //=============================================================================
   function set_plugins_admin_menu($menu) {
@@ -17,33 +17,33 @@
     global $user, $template, $val,$page,$conf;
     if (!isset($page['body_id'])) return;
-    if (!isset($page['body_id'])) return;   
+    if (!isset($page['body_id'])) return;
     switch($page['body_id']){
-	    case  'theAdminPage':     
+        case  'theAdminPage':
         switch($page['page']){
-	 	      case 'plugins_list':	 	      
-              if(!isset($template)) return ;     
+              case 'plugins_list':
+              if(!isset($template)) return ;
                 set_plugins_controler::Affiche_set_plugins();
               break;
-          case 'plugins':	  
+          case 'plugins':
             if (!isset($page['tab'])) return;
-            if ($page['tab']!="installed") return ; 
+            if ($page['tab']!="installed") return ;
               set_plugins_controler::Affiche_set_plugins();
- 	          break;
-		    } 
-    }	
+              break;
+            }
+    }
   }
 //============================================================================
-  function cl_affiche_messages_admin() 
+  function cl_affiche_messages_admin()
   {
     global $template,$page, $template, $pwg_loaded_plugins,$infos_message,$erreur_message,$infos_warning;
-    if ( (isset($_GET['page']) AND $_GET['page'] == 'plugins_list') ) {  
+    if ( (isset($_GET['page']) AND $_GET['page'] == 'plugins_list') ) {
         if  ($infos_message != "")  {
-	        array_push($page['infos'],  $infos_message);
-	        $infos_message="";
-        }
-        if  ($erreur_message != "")  {	
-	        array_push($page['errors'], $erreur_message);
-	        $erreur_message="";
-        }	
+            array_push($page['infos'],  $infos_message);
+            $infos_message="";
+        }
+        if  ($erreur_message != "")  {
+            array_push($page['errors'], $erreur_message);
+            $erreur_message="";
+        }
         if  ($infos_warning!= "")  {
             array_push($page['warnings'], $infos_warning);
@@ -64,5 +64,5 @@
   function set_var($key,$defaut){
      global   $set_plugins_parametres;
-      global $infos_message; 
+      global $infos_message;
 
       if(isset($set_plugins_parametres) && isset($set_plugins_parametres[$key]))
@@ -70,11 +70,11 @@
 
           $ret= (isset($ret))?$ret:$defaut;
-          $ret=isset($_POST[$key])?$_POST[$key]:$ret;       
+          $ret=isset($_POST[$key])?$_POST[$key]:$ret;
        return $ret ;
-  }		 
+  }
   //================================================================
   function save_config(){
-    global $list_visible, $state,$liste,$nb,$page,$conf ; 
-    global $infos_message,$infos_warning,$erreur_message ; 
+    global $list_visible, $state,$liste,$nb,$page,$conf ;
+    global $infos_message,$infos_warning,$erreur_message ;
     $config=array();
     $config = array(
@@ -83,5 +83,5 @@
                   'list'=>$liste,
                   'nb' =>$nb
-              );   
+              );
         // $infos_warning .="save_config" . set_plugins_controler::memo_var($conf['set_plugins'] );
          $conf['set_plugins']= (serialize($config));
@@ -98,19 +98,19 @@
     $m= ob_get_contents();
     ob_end_clean();
-    return $m;		
-  } 
+    return $m;
+  }
   //===================================================================
    function Affiche_set_plugins(){
-  include_once(SET_PLUGINS_PATH."include/constants.php"); 	   
-  include(SET_PLUGINS_PATH.'include/affiche.php');    
-  $all_tpl_vars = $template->get_template_vars('plugins');  
-  if(!$all_tpl_vars)  return;  
+  include_once(SET_PLUGINS_PATH."include/constants.php");
+  include(SET_PLUGINS_PATH.'include/affiche.php');
+  $all_tpl_vars = $template->get_template_vars('plugins');
+  if(!$all_tpl_vars)  return;
   if( $set=="true" ){
-    $state=""; 
-    if(isset($_POST['unset_plugins'])  ) 
-	    $state='inactive';
-    elseif(isset($_POST['set_plugins'])  ) 
-      $state='active';    
-    if($state!=""){    
+    $state="";
+    if(isset($_POST['unset_plugins'])  )
+        $state='inactive';
+    elseif(isset($_POST['set_plugins'])  )
+      $state='active';
+    if($state!=""){
       if($state=="inactive")
           $sens ="DESC";
@@ -119,69 +119,69 @@
       //============================
       $query = 'SELECT *
-      FROM ' . PLUGINS_TABLE . ' 
+      FROM ' . PLUGINS_TABLE . '
       WHERE `state` NOT LIKE "'.$state. '" AND id!="' . "set_plugins" . '"
       ORDER BY `id` '.$sens.'
       LIMIT '.$nb.'
       ';
-      $result = pwg_query($query); 
-      //======= mise à jour =========   
+      $result = pwg_query($query);
+      //======= mise à jour =========
       if($result){
         $query = '
         UPDATE '.PLUGINS_TABLE.'
-        SET state="'.$state.'" 
+        SET state="'.$state.'"
         WHERE `state` NOT LIKE "'.$state. '" AND id!="' . "set_plugins" . '"
         ORDER BY `id`  '.$sens.'
         LIMIT '.$nb.';';
-        pwg_query($query); 
+        pwg_query($query);
       }
       //=====================================
       if(isset($result) && $result==true){
        $liste= array_unique($liste);
-       if(!array_search($add_plugins, $liste)){ 
+       if(!array_search($add_plugins, $liste)){
         array_push($liste,  $add_plugins );
        }
-        while ($row = pwg_db_fetch_assoc($result)) {         
+        while ($row = pwg_db_fetch_assoc($result)) {
           $url =  $row['id'] ;
-          array_push($liste,  $url);     
-        }     
-      }
-
-
-    }else if  (isset($_POST['init_plugins'])){  
-      $liste = array();   
+          array_push($liste,  $url);
+        }
+      }
+
+
+    }else if  (isset($_POST['init_plugins'])){
+      $liste = array();
       $state="active";
       $query = 'SELECT *
-      FROM ' . PLUGINS_TABLE . ' 
-      WHERE `state` LIKE "active" AND id!="' . "set_plugins" . '"    
+      FROM ' . PLUGINS_TABLE . '
+      WHERE `state` LIKE "active" AND id!="' . "set_plugins" . '"
       ';
       $result = pwg_query($query);
      if(isset($result) && $result==true){
-         $liste_plugins = array();   
-          while ($row = pwg_db_fetch_assoc($result)) {         
+         $liste_plugins = array();
+          while ($row = pwg_db_fetch_assoc($result)) {
             $url =  $row['id'] ;
             //array_push($liste_plugins, array('plugin' => $url ) );
-            array_push($liste,  $url );             
-          } 
-      }     
-      $nb=count($liste_plugins);    
+            array_push($liste,  $url );
+          }
+      }
+      $nb=count($liste_plugins);
     }
    if(isset($result) && $result==true){
-      $redirect_url = get_root_url().'admin.php?page='.$_GET['page'];  
+      $redirect_url = get_root_url().'admin.php?page='.$_GET['page'];
       //$infos_message .="-----> Mise à jour : " . $nb."<br />";
       //$infos_message .="Liste Avant: " . set_plugins_controler::memo_var($liste);
-      set_plugins_controler::save_config(); 
-     
+      set_plugins_controler::save_config();
+
       $_POST['set']="";
       $set="";
-      include(SET_PLUGINS_PATH.'include/affiche.php');    
-      
+      include(SET_PLUGINS_PATH.'include/affiche.php');
+
      // redirect($redirect_url);
     }
       //
-   
+
 
   }
   $template->set_filenames(
-    array(    'cl_plugin' => dirname(__FILE__).'/admin.tpl'  )         
+    array(    'cl_plugin' => dirname(__FILE__).'/admin.tpl'  )
   );
 
@@ -190,9 +190,9 @@
   <h2>'.l10n("set_plugins").l10n("Version").": ".$cl_set_plugins_plugin['version'] .'</h2>
   </div>';
-  $bpplus=$header_1.$template->parse('cl_plugin', true);             
-  $template-> assign('ADMIN_CONTENT',$bpplus);               
+  $bpplus=$header_1.$template->parse('cl_plugin', true);
+  $template-> assign('ADMIN_CONTENT',$bpplus);
   $bpplus=$template->parse('plugins', true);
-  $template-> concat('ADMIN_CONTENT',$bpplus);               
-              
+  $template-> concat('ADMIN_CONTENT',$bpplus);
+
 }
 
