ec73701973caa1a3f741feb8ccac03a7eca64260
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2012 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
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 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) return;
16 * Generer n'importe quel info pour un objet : #INFO_TITRE{article, #ENV{id_article}}
17 * Utilise la fonction generer_info_entite() de inc/filtres
18 * se reporter a sa documentation
21 function balise_INFO__dist($p){
22 $info = $p->nom_champ
;
23 $type_objet = interprete_argument_balise(1,$p);
24 $id_objet = interprete_argument_balise(2,$p);
25 if ($info === 'INFO_' or !$type_objet or !$id_objet) {
26 $msg = _T('zbug_balise_sans_argument', array('balise' => ' INFO_'));
27 erreur_squelette($msg, $p);
28 $p->interdire_scripts
= true;
32 $info_sql = strtolower(substr($info,5));
33 $code = "generer_info_entite($id_objet, $type_objet, '$info_sql'".($p->etoile?
","._q($p->etoile
):"").")";
34 $p->code
= champ_sql($info, $p, $code);
35 $p->interdire_scripts
= true;