X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=www%2Fecrire%2Finc%2Finformer.php;h=edd52870be840e4b0bb1b74f4e2f7f3da7173377;hb=4f443dce95ff6f8221c189880a70c74ce1c1f238;hp=6521780fe0745ccbb7eef89056446370c7ae5679;hpb=4a628e9b277d3617535f99d663ca79fa2e891177;p=lhc%2Fweb%2Fwww.git diff --git a/www/ecrire/inc/informer.php b/www/ecrire/inc/informer.php index 6521780f..edd52870 100644 --- a/www/ecrire/inc/informer.php +++ b/www/ecrire/inc/informer.php @@ -3,69 +3,74 @@ /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * - * Copyright (c) 2001-2016 * + * Copyright (c) 2001-2017 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ -if (!defined('_ECRIRE_INC_VERSION')) return; +if (!defined('_ECRIRE_INC_VERSION')) { + return; +} # Les information d'une rubrique selectionnee dans le mini navigateur -// http://doc.spip.org/@inc_informer_dist -function inc_informer_dist($id, $col, $exclus, $rac, $type, $do='aff') -{ +// http://code.spip.net/@inc_informer_dist +function inc_informer_dist($id, $col, $exclus, $rac, $type, $do = 'aff') { include_spip('inc/texte'); + $titre = $descriptif = ''; if ($type == "rubrique") { - $row = sql_fetsel("titre, descriptif", "spip_rubriques", "id_rubrique = $id"); + $row = sql_fetsel("titre, descriptif", "spip_rubriques", "id_rubrique = " . intval($id)); if ($row) { $titre = typo($row["titre"]); $descriptif = propre($row["descriptif"]); } else { $titre = _T('info_racine_site'); } - } else - $titre = ''; + } $res = ''; - if ($type == "rubrique" AND $GLOBALS['spip_display'] != 1 AND isset($GLOBALS['meta']['image_process'])) - if ($GLOBALS['meta']['image_process'] != "non") { - $chercher_logo = charger_fonction('chercher_logo', 'inc'); - if ($res = $chercher_logo($id, 'id_rubrique', 'on')) { - list($fid, $dir, $nom, $format) = $res; - include_spip('inc/filtres_images_mini'); - $res = image_reduire("", 100, 48); - if ($res) - $res = "
$res
"; + if ($type == "rubrique" and $GLOBALS['spip_display'] != 1 and isset($GLOBALS['meta']['image_process'])) { + if ($GLOBALS['meta']['image_process'] != "non") { + $chercher_logo = charger_fonction('chercher_logo', 'inc'); + if ($res = $chercher_logo($id, 'id_rubrique', 'on')) { + list($fid, $dir, $nom, $format) = $res; + include_spip('inc/filtres_images_mini'); + $res = image_reduire("", 100, 48); + if ($res) { + $res = "
$res
"; + } + } } } - $rac = spip_htmlentities($rac); + $rac = spip_htmlentities($rac, ENT_QUOTES); + $do = spip_htmlentities($do, ENT_QUOTES); + $id = intval($id); # ce lien provoque la selection (directe) de la rubrique cliquee # et l'affichage de son titre dans le bandeau $titre = strtr(str_replace("'", "’", - str_replace('"', """, textebrut($titre))), - "\n\r", " "); + str_replace('"', """, textebrut($titre))), + "\n\r", " "); $js_func = $do . '_selection_titre'; + return "
" - . "" - . "" + . "" . "
" . "
" . (!$res ? '' : $res) - . "

".safehtml($titre)."

" - . (!$descriptif ? '' : "
".safehtml($descriptif)."
") - . "
" + . "

" . safehtml($titre) . "

" + . (!$descriptif ? '' : "
" . safehtml($descriptif) . "
") + . "
" . "" - . "
" - . "
"; + . "
" + . ""; } -?>