F-d-ration_de_groupes/balint_options.php
2020-03-08 15:30:47 +01:00

64 lines
1.4 KiB
PHP

<?php
/**
* Options au chargement du plugin balint
*
* @plugin balint
* @copyright 2020
* @author Gamuza[informatique]
* @licence GNU/GPL
* @package SPIP\Fip\Options
*/
if (!defined('_ECRIRE_INC_VERSION')) {
return;
}
function debug_spip(){
define('_DEBUG_SLOW_QUERIES', true);
define('_BOUCLE_PROFILER', 5000);
define('_LOG_FILTRE_GRAVITE', 8);
define('_LOG_FILELINE',true);
define('_DEBUG_AUTORISER', true);
define('_MAX_LOG', 500000);
error_reporting(E_ALL^E_NOTICE);
ini_set ("display_errors", "On");
ini_set("html_errors", "On");
ini_set("allow_url_fopen", "On");
define('SPIP_ERREUR_REPORT',E_ALL^E_NOTICE);
define('SPIP_ERREUR_REPORT_INCLUDE_PLUGINS',E_ALL^E_NOTICE);
define('_NO_CACHE', -1);
define('_INTERDIRE_COMPACTE_HEAD_ECRIRE', true);
}
//debug_spip();
if (!isset($GLOBALS['z_blocs']))
$GLOBALS['z_blocs'] = array(
'content',
'aside',
'extra',
'head',
'head_js',
'header',
'footer',
'breadcrumb');
function autoriser_ecrire($faire, $type, $id, $qui, $opt){
// Pour ne permettre l'accès à l'espace privé qu'aux admins
// (pour les autres, on redirige vers l'accueil)
if ($qui['statut']!='0minirezo'){
include_spip('inc/headers');
redirige_par_entete( url_de_base());
}
else {
return in_array($qui['statut'], array('0minirezo'));
}
}
// On retire les boutons "Espace privé" et "Recalculer" pour les admins
$GLOBALS['flag_preserver'] = true;