From bb2aa2abe442039993ad853c1b207b1066ba275a Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Tue, 24 Jan 2006 13:49:40 +0000 Subject: [PATCH] =?UTF-8?q?detecter=20les=20plugins=20absents=20et=20mettr?= =?UTF-8?q?e=20un=20message=20d'erreur=20un=20peu=20cru=20pour=20les=20adm?= =?UTF-8?q?ins=20(on=20v=C3=A9rifie=20le=20cookie)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/inc_minipres.php | 1 - ecrire/inc_utils.php | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ecrire/inc_minipres.php b/ecrire/inc_minipres.php index 9643d424f7..b1fd5f66c3 100644 --- a/ecrire/inc_minipres.php +++ b/ecrire/inc_minipres.php @@ -100,7 +100,6 @@ function version_svn_courante() { AND lire_fichier(_DIR_RESTREINT.'.svn/entries', $c2) # repertoires relativement accessoires AND (lire_fichier(_DIR_RACINE.'formulaires/.svn/entries', $c3) or true) - AND (lire_fichier(_DIR_RACINE.'plugins/.svn/entries', $c4) or true) AND (lire_fichier(_DIR_RACINE.'IMG/.svn/entries', $c5) or true) AND preg_match_all(',committed-rev="([0-9]+)",', "$c1$c2$c3$c4$c5", $r, PREG_PATTERN_ORDER)) diff --git a/ecrire/inc_utils.php b/ecrire/inc_utils.php index 1f04c7c9a5..55582af604 100644 --- a/ecrire/inc_utils.php +++ b/ecrire/inc_utils.php @@ -620,7 +620,10 @@ function find_in_path ($filename, $path='AUTO', $sinon='') { // charger les definitions des plugins function charger_plugins($plugins) { foreach ($plugins as $plug) { - include(_DIR_PLUGINS.$plug.'/version.php'); + if (@is_readable($f = _DIR_PLUGINS.$plug.'/version.php')) + include($f); + else if (isset($_COOKIE['spip_admin'])) + echo _L("Erreur plugin « $plug » absent.<br />\n"); } #var_dump($plugins);var_dump($spip_pipeline);var_dump($spip_matrice);exit; } -- GitLab