X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Fpublic%2Fboucles.php;fp=www%2Fecrire%2Fpublic%2Fboucles.php;h=385dfb1cdb0d4599334db053018343ab8ec3e498;hp=d3373c2b825a4a39e6f5e19aad75849a06ec9a69;hb=e99f0878011913365e49b30d90e496c24c301393;hpb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed diff --git a/www/ecrire/public/boucles.php b/www/ecrire/public/boucles.php index d3373c2..385dfb1 100644 --- a/www/ecrire/public/boucles.php +++ b/www/ecrire/public/boucles.php @@ -3,7 +3,7 @@ /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * - * Copyright (c) 2001-2011 * + * Copyright (c) 2001-2014 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * @@ -71,9 +71,12 @@ function boucle_AUTEURS_dist($id_boucle, &$boucles) { // uniquement les auteurs d'un article publie if (!$GLOBALS['var_preview']) if (!isset($boucle->modificateur['lien']) AND !isset($boucle->modificateur['tout'])) { - fabrique_jointures($boucle, array( - array($id_table, array('spip_auteurs_articles'), 'id_auteur'), - array('', array('spip_articles'), 'id_article')), true, $boucle->show, $id_table); + $trouver_table = charger_fonction('trouver_table', 'base'); + $def = $trouver_table('spip_auteurs_articles'); + $def = array('spip_auteurs_articles', $def); + $def = array($id_table, $def, 'id_auteur'); + $def2 = array('', array('spip_articles'), 'id_article'); + fabrique_jointures($boucle, array($def, $def2), true, $boucle->show, $id_table); $t = array_search('spip_articles', $boucle->from); array_unshift($boucle->where, array("'='", "'$t.statut'", "'\\'publie\\''")); @@ -301,7 +304,11 @@ function boucle_SYNDIC_ARTICLES_dist($id_boucle, &$boucles) { else { $jointure = array_search("spip_syndic", $boucle->from); if (!$jointure) { - fabrique_jointures($boucle, array(array($id_table, array('spip_syndic'), 'id_syndic')), true, $boucle->show, $id_table); + $trouver_table = charger_fonction('trouver_table', 'base'); + $def = $trouver_table('spip_syndic'); + $def = array('spip_syndic', $def); + $def = array($id_table, $def, 'id_syndic'); + fabrique_jointures($boucle, array($def), true, $boucle->show, $id_table); $jointure = array_search('spip_syndic', $boucle->from); } array_unshift($boucle->where,array("'='", "'$mstatut'", "'\\'publie\\''"));