diff --git a/ecrire/inc/article_select.php b/ecrire/inc/article_select.php index 868e5abadaf32f2f595c3a35bdbeac96ceb57958..0df6a52bd62f5b2b56017f5fcc6a496c5af1ded1 100644 --- a/ecrire/inc/article_select.php +++ b/ecrire/inc/article_select.php @@ -22,7 +22,7 @@ function article_select($id_article, $id_rubrique, $lier_trad, $new) // ESSAI pour "Joindre un document" depuis l'espace prive (UPLOAD_DIRECT) /*if ($GLOBALS['action'] AND $GLOBALS['doc']) { global $action, $doc; - if ($var_nom = include_fonction($action, 'action')) + if ($var_nom = charger_fonction($action, 'action')) $var_nom($doc); else spip_log("fonction $var_nom indisponible"); diff --git a/ecrire/inc/mail.php b/ecrire/inc/mail.php index 3d06afb673b4b2db9dd3bd7a4f5c2e0570dfeb62..113b2ab71d8a40511255d8a48c2c992fdf7c2da1 100644 --- a/ecrire/inc/mail.php +++ b/ecrire/inc/mail.php @@ -267,7 +267,7 @@ function cron_mail($t) { // $t = 0 si le fichier de lock a ete detruit if (!$t) $t = time() - (3600 * 24 * $jours_neuf); - $f = include_fonction('localiser_page', 'public'); + $f = charger_fonction('localiser_page', 'public'); $page = $f('nouveautes', array('date' => date('Y-m-d H:i:s', $t), 'jours_neuf' => $jours_neuf)); diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php index dbbb43aed94e3fc2ec8feb4aefd79f3f16e3f125..54ccbd05acb3286e91580775a1ad54178815cc5b 100644 --- a/ecrire/inc/utils.php +++ b/ecrire/inc/utils.php @@ -41,7 +41,7 @@ function include_ecrire($file, $silence=false) { // charge un fichier perso ou, a defaut, standard // et retourne si elle existe le nom de la fonction homonyme (exec_$nom), // ou de suffixe _dist -function include_fonction($nom, $dossier='exec', $continue=false) { +function charger_fonction($nom, $dossier='exec', $continue=false) { // Securite de base if (!preg_match(',^[\w-]+$,', $nom)) diff --git a/ecrire/index.php b/ecrire/index.php index 708fb7d792337549b296888582616f427c0e6152..4eee1d1dc9be80ed69634986ed5dea70afd2c974 100644 --- a/ecrire/index.php +++ b/ecrire/index.php @@ -83,7 +83,7 @@ if (autoriser_sans_cookie($exec)) { if (!isset($reinstall)) $reinstall = 'non'; } else { include_spip('inc/session'); - $var_auth = include_fonction('auth', 'inc'); + $var_auth = charger_fonction('auth', 'inc'); $var_auth = $var_auth(); if ($var_auth) redirige_par_entete($var_auth); } @@ -174,7 +174,7 @@ AND $GLOBALS['meta']["debut_restauration"] AND !($exec=='js_menu_rubriques')) $exec = 'import_all'; -$var_f = include_fonction($exec); +$var_f = charger_fonction($exec); $var_f(); ?> diff --git a/ecrire/public.php b/ecrire/public.php index 0f8142bc9e5e8757de67221a9db965f4ed79c1de..b22a4cf45bf31d566e319cee97f0d6a79aa44aa9 100644 --- a/ecrire/public.php +++ b/ecrire/public.php @@ -44,7 +44,7 @@ if (defined('_INC_PUBLIC')) { // Est-ce une action ? if ($action = _request('action')) { - $var_f = include_fonction($action, 'action'); + $var_f = charger_fonction($action, 'action'); $var_f(); if ($redirect) redirige_par_entete($redirect); exit; @@ -160,7 +160,7 @@ if (defined('_INC_PUBLIC')) { if ($xhtml === true) $xhtml ='tidy'; else if ($xhtml == 'spip_sax') $xhtml = 'sax'; - if ($f = include_fonction($xhtml, 'inc')) + if ($f = charger_fonction($xhtml, 'inc')) $page['texte'] = $f($page['texte']); } diff --git a/ecrire/public/compiler_squelette.php b/ecrire/public/compiler_squelette.php index 5bec042483be287f52fb8eb973c63f364d48b30c..11ec7350280ad7fe9ad579da7cfc12c089e6cdda 100644 --- a/ecrire/public/compiler_squelette.php +++ b/ecrire/public/compiler_squelette.php @@ -591,7 +591,7 @@ function public_compiler_squelette_dist($squelette, $nom, $gram, $sourcefile) { $boucles = array(); spip_timer('calcul_skel'); - $f = include_fonction('phraser_'.$gram, 'public'); + $f = charger_fonction('phraser_'.$gram, 'public'); $racine = $f($squelette, '',$boucles, $nom); diff --git a/ecrire/public/debug.php b/ecrire/public/debug.php index 0e39136d8fc247d47ca157c8a0c9b85a678d53aa..57fe986a3f520b5462737f4a6219f39e967e2d87 100644 --- a/ecrire/public/debug.php +++ b/ecrire/public/debug.php @@ -430,7 +430,7 @@ function debug_dumpfile ($texte, $fonc, $type) { $titre = 'zbug_' . $titre; } - else if ($sax = include_fonction('sax', 'inc') + else if ($sax = charger_fonction('sax', 'inc') AND $res = $sax($texte)) { if (ereg("^[[:space:]]*([^<][^0-9]*)([0-9]*)(.*[^0-9])([0-9]*)$", $GLOBALS['xhtml_error'], $r)) { $fermant = $r[2]; diff --git a/ecrire/public/executer_squelette.php b/ecrire/public/executer_squelette.php index 278d653cd5f43bfb624f203585422dd3242cb5eb..52b1a94d8327720c5c20416e1236ccd2562052b2 100644 --- a/ecrire/public/executer_squelette.php +++ b/ecrire/public/executer_squelette.php @@ -54,7 +54,7 @@ function public_executer_squelette($squelette, $mime_type, $gram, $sourcefile) { // charger le source, si possible, et compiler if (lire_fichier ($sourcefile, $skel)) { - $f = include_fonction('compiler_squelette', 'public'); + $f = charger_fonction('compiler_squelette', 'public'); $skel_code = $f($skel, $nom, $gram, $sourcefile); } diff --git a/ecrire/public/global.php b/ecrire/public/global.php index 7407380f61fc8e2f6399ba73029369e2efbf3b7b..54c1a6e19093fad9a2822ec02173fc9feee28d7e 100644 --- a/ecrire/public/global.php +++ b/ecrire/public/global.php @@ -33,7 +33,7 @@ function calcule_header_et_page ($fond) { if (strlen($_POST['confirmer_forum']) > 0 OR ($GLOBALS['afficher_texte']=='non' AND $_POST['ajouter_mot'])) { - $f = include_fonction('forum_insert', 'inc'); + $f = charger_fonction('forum_insert', 'inc'); redirige_par_entete($f()); } @@ -86,7 +86,7 @@ function afficher_page_globale ($fond) { global $flag_dynamique, $flag_ob, $flag_preserver,$lastmodified, $use_cache, $var_mode, $var_preview; - $fcache = include_fonction('utiliser_cache', 'public'); + $fcache = charger_fonction('utiliser_cache', 'public'); // Garnir ces quatre parametres avec les infos sur le cache $fcache(NULL, $use_cache, $chemin_cache, $page, $lastmodified); @@ -127,7 +127,7 @@ function afficher_page_globale ($fond) { if (!$use_cache) restaurer_globales($page['contexte']); else { - $f = include_fonction('localiser_page', 'public'); + $f = charger_fonction('localiser_page', 'public'); $page = $f($fond, '', $chemin_cache); if ($chemin_cache) $fcache(NULL, $use_cache, $chemin_cache, $page, $lastmodified); @@ -197,7 +197,7 @@ function auto_expire($page) function inclure_page($fond, $contexte_inclus, $cache_incluant='') { global $lastmodified; - $fcache = include_fonction('utiliser_cache', 'public'); + $fcache = charger_fonction('utiliser_cache', 'public'); // Garnir ces quatre parametres avec les infos sur le cache $fcache($contexte_inclus, $use_cache, $chemin_cache, $page, $lastinclude); @@ -222,7 +222,7 @@ function inclure_page($fond, $contexte_inclus, $cache_incluant='') { if (!$use_cache) { $lastmodified = max($lastmodified, $lastinclude); } else { - $f = include_fonction('localiser_page', 'public'); + $f = charger_fonction('localiser_page', 'public'); $page = $f($fond, $contexte_inclus, $chemin_cache); $lastmodified = time(); if ($chemin_cache) diff --git a/ecrire/public/localiser_page.php b/ecrire/public/localiser_page.php index 848301f94383c391b38079bddbe1a8d4d1cef9c8..63ef41725dd7b04ef0d40095e76478a94afc2c5d 100644 --- a/ecrire/public/localiser_page.php +++ b/ecrire/public/localiser_page.php @@ -305,7 +305,7 @@ function public_localiser_page_dist($fond, $local='', $cache='') { if (!$GLOBALS['forcer_lang']) lang_select($lang); - $f = include_fonction('trouver_squelette', 'public'); + $f = charger_fonction('trouver_squelette', 'public'); list($skel,$mime_type, $gram, $sourcefile) = $f($fond, $id_rubrique_fond,$GLOBALS['spip_lang']); // Charger le squelette en specifiant les langages cibles et source @@ -313,7 +313,7 @@ function public_localiser_page_dist($fond, $local='', $cache='') { // et appliquer sa fonction principale sur le contexte. // Passer le nom du cache pour produire sa destruction automatique - $f = include_fonction('executer_squelette', 'public'); + $f = charger_fonction('executer_squelette', 'public'); if ($fonc = $f($skel, $mime_type, $gram, $sourcefile)){ spip_timer('calcul page'); diff --git a/ecrire/public/references.php b/ecrire/public/references.php index 38098f781e6dc3308ae7223e9f472e2d65113f0f..267c4429f03e2455bcaeb84a16af36774be3c673 100644 --- a/ecrire/public/references.php +++ b/ecrire/public/references.php @@ -138,16 +138,16 @@ function calculer_champ($p) { } // Cette fonction sert d'API pour demander une balise SPIP sans filtres. -// Pour une balise nommmee NOM, elle demande a include_fonction de chercher +// Pour une balise nommmee NOM, elle demande a charger_fonction de chercher // s'il existe une fonction balise_NOM ou balise_NOM_dist // eventuellement en chargeant le fichier balise/NOM.php. // Si ce n'est pas le cas, hormis le cas historique des balise LOGO_*, // elle estime que c'est une reference a une colonne de table connue. -// Les surcharges via include_fonction sont donc possibles. +// Les surcharges via charger_fonction sont donc possibles. function calculer_balise($nom, $p) { - $f = include_fonction($nom, 'balise', true); + $f = charger_fonction($nom, 'balise', true); if ($f) return $f($p);