diff --git a/blocks_fonctions.php b/blocks_fonctions.php index e2342d63e50e4d3e03c37445bb2f3ee7ef6cf405..ccd276004b4a8c18e4e21119d3bef743b22eb91b 100644 --- a/blocks_fonctions.php +++ b/blocks_fonctions.php @@ -158,18 +158,18 @@ function _block_charger_block($id_bloc) { * @param $id_bloc * @return mixed|string */ -function generer_TITRE_BLOC($id_bloc){ - if($infos = sql_fetsel( +function generer_TITRE_BLOC($id_bloc) { + if ($infos = sql_fetsel( 'bt.titre, bl.objet, bl.rang_lien, bl.id_objet', 'spip_blocs b join spip_blocs_types bt using(id_blocs_type) left join spip_blocs_liens bl using(id_bloc)', - 'b.id_bloc = '.(int)$id_bloc + 'b.id_bloc = ' . (int)$id_bloc )) { $titre = $infos['titre']; if ($infos['id_objet'] && $infos['objet']) { $titre = generer_objet_info($infos['id_objet'], $infos['objet'], 'titre') . ' - ' . $titre . ' #' . $infos['rang_lien']; } } else { - $titre = _T('bloc:titre_bloc').' '.$id_bloc; + $titre = _T('bloc:titre_bloc') . ' ' . $id_bloc; } return $titre;