X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Fexec%2Fcontrole_forum.php;fp=www%2Fecrire%2Fexec%2Fcontrole_forum.php;h=7bd2020fa2ddaabb637255519edca86f0331775f;hp=f22a28a0f2799b894bf94638ef91f9efdd46fe15;hb=e99f0878011913365e49b30d90e496c24c301393;hpb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed diff --git a/www/ecrire/exec/controle_forum.php b/www/ecrire/exec/controle_forum.php index f22a28a..7bd2020 100644 --- a/www/ecrire/exec/controle_forum.php +++ b/www/ecrire/exec/controle_forum.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. * @@ -34,7 +34,7 @@ function forum_parent($id_forum) { $statut = $row['statut']; if ($forum_stat == "prive" OR $forum_stat == "privoff") { return array('pref' => _T('item_reponse_article'), - 'url' => generer_url_ecrire("articles","id_article=$id_article"), + 'url' => generer_url_ecrire("articles#poster_forum_prive-$id_forum","id_article=$id_article"), 'type' => 'id_article', 'valeur' => $id_article, 'titre' => $titre); @@ -170,7 +170,7 @@ function controle_forum_boucle($row, $args) { if ($forum_notes = safehtml(calculer_notes())) $suite .= "
".justifier(safehtml($forum_notes))."
"; - if (strlen($forum_url_site) > 10 AND strlen($forum_nom_site) > 3) + if (strlen($forum_url_site) > 10 AND strlen($forum_nom_site) >= 3) $suite .= "\n
$forum_nom_site
"; return "\n

" . @@ -210,12 +210,16 @@ function exec_controle_forum_args($id_rubrique, $type, $debut, $pas, $enplus, $r } else { if (!preg_match('/^\w+$/', $type)) $type = 'public'; - $formulaire_recherche = formulaire_recherche("controle_forum",""); - list($from,$where) = critere_statut_controle_forum($type, $id_rubrique, $recherche); + exec_controle_forum_args2($id_rubrique, $type, $debut, $pas, $enplus, $recherche, $from, $where, intval(_request('debut_id_forum'))); + } +} + +function exec_controle_forum_args2($id_rubrique, $type, $debut, $pas, $enplus, $recherche, $from, $where, $debut_id_forum) +{ // Si un id_controle_forum est demande, on adapte le debut - if ($debut_id_forum = intval(_request('debut_id_forum')) + if ($debut_id_forum AND (NULL !== ($d = sql_getfetsel('date_heure', 'spip_forum', "id_forum=$debut_id_forum")))) { $debut = sql_countsel($from, $where . (" AND F.date_heure > '$d'")); } @@ -244,12 +248,8 @@ function exec_controle_forum_args($id_rubrique, $type, $debut, $pas, $enplus, $r if (_AJAX) { ajax_retour($res); } else { - $ancre = 'controle_forum'; - $res = "
$res
"; - pipeline('exec_init',array('args'=>array('exec'=>'controle_forum', 'type'=>$type),'data'=>'')); - $commencer_page = charger_fonction('commencer_page', 'inc'); echo $commencer_page(_T('titre_page_forum_suivi'), "forum", "forum-controle"); @@ -285,14 +285,13 @@ function exec_controle_forum_args($id_rubrique, $type, $debut, $pas, $enplus, $r echo creer_colonne_droite('', true); echo pipeline('affiche_droite',array('args'=>array('exec'=>'controle_forum', 'type'=>$type),'data'=>'')); - echo debut_droite('', true); echo pipeline('affiche_milieu',array('args'=>array('exec'=>'controle_forum', 'type'=>$type),'data'=>'')); - echo $formulaire_recherche . "
"; - echo $res; + echo formulaire_recherche("controle_forum",""); + echo "
"; + echo "
", $res, "
"; echo fin_gauche(), fin_page(); } - } } ?>