Displays proper url in auth-group-x login (Closes #1608).
authorStéphane Jacob <sj@m4x.org>
Sun, 8 Apr 2012 16:01:52 +0000 (18:01 +0200)
committerStéphane Jacob <sj@m4x.org>
Sun, 8 Apr 2012 16:06:36 +0000 (18:06 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
ChangeLog
modules/auth.php
templates/core/password_prompt.tpl

index 37b1d76..41b5bfc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@ Bug/Wish:
     * Admin:
         - #1604: Displays AX id on admin page                              -JAC
 
+    * Auth:
+        - #1608: Displays proper url in auth-group-x login                 -JAC
+
     * Search:
         - #1572: Removes remaining results count from queries              -JAC
         - #1574: Correctly displays State corps                            -GLN
index d510da3..0d9e12b 100644 (file)
@@ -118,8 +118,11 @@ class AuthModule extends PLModule
      */
     function handler_groupex($page, $charset = 'utf8')
     {
+        $gpex_url = urldecode(Get::s('url'));
+
         if (!S::logged()) {
             $page->assign('external_auth', true);
+            $page->assign('gpex_url', $gpex_url);
             $page->setTitle('Authentification');
             $page->setDefaultSkin('group_login');
 
@@ -141,7 +144,6 @@ class AuthModule extends PLModule
         $this->load('auth.inc.php');
 
         $gpex_pass = Get::s('pass');
-        $gpex_url  = urldecode(Get::s('url'));
         if (Get::has('session')) {
             if (strpos($gpex_url, '?') === false) {
                 $gpex_url .= "?PHPSESSID=" . Get::s('session');
index 8dc634d..56e84e8 100644 (file)
@@ -31,7 +31,7 @@
   {else}
     la page que vous avez demandée
   {/if}
-  (<strong>{if t($external_auth)}{$smarty.server.HTTP_REFERER|truncate:120:"...":false}{else}{$globals->baseurl}/{$platal->pl_self()}{/if}</strong>)
+  (<strong>{if t($external_auth)}{$gpex_url|truncate:120:"...":false}{else}{$globals->baseurl}/{$platal->pl_self()}{/if}</strong>)
   nécessite une authentification.
 </p>
 {else}