Changeset 45397 in spip-zone


Ignore:
Timestamp:
Mar 14, 2011, 1:18:37 PM (9 years ago)
Author:
cedric@…
Message:

suite a http://core.spip.org/projects/spip/repository/revisions/17398
on conserve generer_url_ecrire_forum qui gere le cas particulier debut_forum=@xxx

mais on change sa signature, le flag 'statut' devenant 'plublic'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _core_/plugins/forum/urls/generer_url_ecrire_forum.php

    r44661 r45397  
    1212
    1313// http://doc.spip.org/@generer_url_ecrire_forum
    14 function urls_generer_url_ecrire_forum_dist($id, $args='', $ancre='', $statut='', $connect='') {
     14function urls_generer_url_ecrire_forum_dist($id, $args='', $ancre='', $public=null, $connect='') {
    1515        $a = "id_forum=" . intval($id);
    16         if (!$statut) {
    17                 $statut = sql_getfetsel('statut', 'spip_forum', $a,'','','','',$connect);
    18         }
    19         $h = ($statut == 'publie' OR $connect)
     16        if (is_null($public) AND !$connect)
     17                $public = objet_test_si_publie($objet, $id, $connect);
     18        $h = ($public OR $connect)
    2019        ?  generer_url_entite_absolue($id, 'forum', $args, $ancre, $connect)
    2120        : (generer_url_ecrire('controler_forum', "debut_forum=@$id" . ($args ? "&$args" : ''))
Note: See TracChangeset for help on using the changeset viewer.