From b435c0894bc6fe67fa4d1c7da1485300fd088c32 Mon Sep 17 00:00:00 2001 From: x2001corpet Date: Thu, 8 Jun 2006 08:20:27 +0000 Subject: [PATCH 1/1] bug 414, les liens du carnet RSS ou mail de notif redirigent vers les fiches privees git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@306 839d8a87-29fc-0310-9880-83ba4fa771e5 --- ChangeLog | 3 +++ bin/cron/notifs.send.php | 4 ++-- include/xorg.inc.php | 2 ++ templates/carnet/rss.tpl | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9636694..65f1399 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,9 @@ Bug/Wish : * Admin : - #408: Admin can change sex of users without root intervention. -Car + * Carnet : + - #414: Link to users' fiche go to private fiche and not public. -Car + * Events : - #268: Hide read events. -Car - #391: Go back to top link at end of each event. -Car diff --git a/bin/cron/notifs.send.php b/bin/cron/notifs.send.php index efa5d08..891700f 100755 --- a/bin/cron/notifs.send.php +++ b/bin/cron/notifs.send.php @@ -54,8 +54,8 @@ EOF; require_once('../../plugins/modifier.date_format.php'); $date = smarty_modifier_date_format($x['date'], '%d %b %Y'); $text .= " - (X{$x['promo']}) {$x['prenom']} {$x['nom']} le $date\n"; - $text .= " {$globals->baseurl}/fiche.php?user={$x['bestalias']}\n\n"; - $html .= "
  • (X{$x['promo']}) {$x['prenom']} {$x['nom']} le $date
  • \n"; + $text .= " {$globals->baseurl}/fiche.php?user={$x['bestalias']}&force_login=1\n\n"; + $html .= "
  • (X{$x['promo']}) {$x['prenom']} {$x['nom']} le $date
  • \n"; } $text .= "\n"; $html .= "\n"; diff --git a/include/xorg.inc.php b/include/xorg.inc.php index 276cc8b..cb1fb37 100644 --- a/include/xorg.inc.php +++ b/include/xorg.inc.php @@ -31,6 +31,8 @@ function _new_page($type, $tpl_name, $min_auth, $admin=false) { global $page,$globals; require_once("xorg/page.inc.php"); + if ($min_auth == AUTH_PUBLIC && Env::get('force_login') == '1') + $min_auth = AUTH_COOKIE; if (!empty($admin)) { $page = new XorgAdmin($tpl_name, $type); } else switch($min_auth) { diff --git a/templates/carnet/rss.tpl b/templates/carnet/rss.tpl index 0b35b06..8553e37 100644 --- a/templates/carnet/rss.tpl +++ b/templates/carnet/rss.tpl @@ -58,7 +58,7 @@ [{$notifs->_cats[$cid].short}] {$x.prenom} {$x.nom} ({$x.promo}) - le {$x.date|date_format|utf8_encode} - {#globals.baseurl#}/fiche.php?user={$x.bestalias} + {#globals.baseurl#}/fiche.php?user={$x.bestalias}&force_login=1 -- 2.1.4