[SPIP][PLUGINS] v3.0-->v3.2
[lhc/web/www.git] / www / plugins-dist / forum / urls / generer_url_ecrire_forum.php
index 8748b93..8aa8fec 100644 (file)
  *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
 \***************************************************************************/
 
-if (!defined("_ECRIRE_INC_VERSION")) return;
+if (!defined("_ECRIRE_INC_VERSION")) {
+       return;
+}
 
 // https://code.spip.net/@generer_url_ecrire_forum
-function urls_generer_url_ecrire_forum_dist($id, $args='', $ancre='', $public=null, $connect='') {
+function urls_generer_url_ecrire_forum_dist($id, $args = '', $ancre = '', $public = null, $connect = '') {
        $a = "id_forum=" . intval($id);
-       if (is_null($public) AND !$connect)
+       if (is_null($public) and !$connect) {
                $public = objet_test_si_publie('forum', $id, $connect);
-       $h = ($public OR $connect)
-       ?  generer_url_entite_absolue($id, 'forum', $args, $ancre, $connect)
-       : (generer_url_ecrire('controler_forum', "debut_forum=@$id" . ($args ? "&$args" : ''))
-               . ($ancre ? "#$ancre" : ''));
+       }
+       $h = ($public or $connect)
+               ? generer_url_entite_absolue($id, 'forum', $args, $ancre, $connect)
+               : (generer_url_ecrire('controler_forum', "debut_forum=@$id" . ($args ? "&$args" : ''))
+                       . ($ancre ? "#$ancre" : ''));
+
        return $h;
-}
\ No newline at end of file
+}