[PLUGINS] ~maj globale
[lhc/web/www.git] / www / plugins / yaml / experimental / yaml_fonctions.php
index a9f27e5..4b95e90 100644 (file)
@@ -1,16 +1,17 @@
 <?php
 
-if (!defined("_ECRIRE_INC_VERSION")) return;
+if (!defined('_ECRIRE_INC_VERSION')) {
+       return;
+}
 
 function yaml_article($id_article) {
        include_spip('inc/yaml');
        $a = array_filter(sql_fetsel('*', 'spip_articles', 'id_article='.$id_article));
        $a['rubrique'] = array_filter(sql_fetsel('*', 'spip_rubriques', 'id_rubrique='.$a['id_rubrique']));
 
-       foreach(sql_allfetsel('*', 'spip_mots AS m LEFT JOIN spip_mots_articles AS c ON m.id_mot=c.id_mot', 'c.id_article='.$id_article) as $m)
+       foreach (sql_allfetsel('*', 'spip_mots AS m LEFT JOIN spip_mots_articles AS c ON m.id_mot=c.id_mot', 'c.id_article='.$id_article) as $m) {
                $a['mots'][] = array_filter($m);
+       }
 
-       return yaml_encode(
-               array_filter($a)
-               );
-}
\ No newline at end of file
+       return yaml_encode(array_filter($a));
+}