[ Index ]
 

Code source de SPIP 1.9.2c

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/ecrire/action/ -> activer_plugins.php (source)

   1  <?php
   2  
   3  /***************************************************************************\
   4   *  SPIP, Systeme de publication pour l'internet                           *
   5   *                                                                         *
   6   *  Copyright (c) 2001-2007                                                *
   7   *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
   8   *                                                                         *
   9   *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
  10   *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
  11  \***************************************************************************/
  12  
  13  if (!defined("_ECRIRE_INC_VERSION")) return;
  14  
  15  // mise a jour des donnees si envoi via formulaire
  16  // http://doc.spip.org/@enregistre_modif_plugin
  17  function enregistre_modif_plugin(){
  18      include_spip('inc/plugin');
  19    // recuperer les plugins dans l'ordre des $_POST
  20    $test = array();
  21      foreach(liste_plugin_files() as $file){
  22        $test['s'.substr(md5("statusplug_$file"),0,16)] = $file;
  23      }
  24      foreach($test as $postvar=>$file){
  25          if (!isset($test[$alt_postvar]))
  26            $test[$alt_postvar] = $file;
  27      }
  28      $plugin=array();
  29      foreach($_POST as $choix=>$val){
  30          if (isset($test[$choix])&&$val=='O')
  31              $plugin[]=$test[$choix];
  32      }
  33      global $connect_id_auteur, $connect_login;
  34      spip_log("Changement des plugins actifs par auteur id=$connect_id_auteur :".implode(',',$plugin));
  35      ecrire_plugin_actifs($plugin);
  36      ecrire_metas();
  37  }
  38  
  39  // http://doc.spip.org/@action_activer_plugins_dist
  40  function action_activer_plugins_dist() {
  41  
  42      $securiser_action = charger_fonction('securiser_action', 'inc');
  43      $arg = $securiser_action();
  44  
  45      enregistre_modif_plugin();
  46      
  47      if ($redirect = _request('redirect')){
  48          include_spip('inc/headers');
  49          $redirect = str_replace('&amp;','&',$redirect);
  50          redirige_par_entete($redirect);
  51      }
  52  }
  53  
  54  ?>


Généré le : Wed Nov 21 10:20:27 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics