[SPIP] v3.2.7-->v3.2.9
[lhc/web/www.git] / www / plugins-dist / forum / urls / generer_url_forum.php
index 79b4bd3..5ff8fd8 100644 (file)
@@ -3,25 +3,29 @@
 /***************************************************************************\
  *  SPIP, Systeme de publication pour l'internet                           *
  *                                                                         *
- *  Copyright (c) 2001-2014                                                *
+ *  Copyright (c) 2001-2020                                                *
  *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
  *                                                                         *
  *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
  *  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;
+}
 
-function urls_generer_url_forum_dist($id_forum, $args='', $ancre='') {
+function urls_generer_url_forum_dist($id_forum, $args = '', $ancre = '') {
        if ($id_forum = intval($id_forum)) {
                include_spip('inc/forum');
-               list($type, $id,) = racine_forum($id_forum);
+               list($type, $id, ) = racine_forum($id_forum);
                if ($type) {
-                       if (!$ancre) $ancre = "forum$id_forum";
+                       if (!$ancre) {
+                               $ancre = "forum$id_forum";
+                       }
+
                        return generer_url_entite($id, $type, $args, $ancre, true);
                }
        }
+
        return '';
 }
-
-?>
\ No newline at end of file