[Fusionforge-commits] r9923 - in trunk/gforge/www: account include

Roland Mas lolando at libremir.placard.fr.eu.org
Thu May 27 12:32:05 CEST 2010


Author: lolando
Date: 2010-05-27 12:32:05 +0200 (Thu, 27 May 2010)
New Revision: 9923

Modified:
   trunk/gforge/www/account/login.php
   trunk/gforge/www/include/exit.php
Log:
Tell the user when they've been redirected to the login page (and why)

Modified: trunk/gforge/www/account/login.php
===================================================================
--- trunk/gforge/www/account/login.php	2010-05-27 10:31:53 UTC (rev 9922)
+++ trunk/gforge/www/account/login.php	2010-05-27 10:32:05 UTC (rev 9923)
@@ -37,6 +37,7 @@
 $form_loginname = getStringFromRequest('form_loginname');
 $form_pw = getStringFromRequest('form_pw');
 $feedback = getStringFromRequest('feedback');
+$triggered = getIntFromRequest('triggered');
 
 //
 //	Validate return_to
@@ -120,10 +121,16 @@
 	html_feedback_top($feedback);
 }
 
+echo '<p>';
+
+if ($triggered) {
+	echo '<span class="error">' ;
+	echo _('You\'ve been redirected to this login page because you have tried accessing a page that was not available to you as an anonymous user.');
+	echo '</span> ' ;
+}
+echo _('Cookies must be enabled past this point.');
+
 ?>
-	
-<p>
-<span class="error"><?php echo _('Cookies must be enabled past this point.'); ?></span>
 </p>
 <form action="<?php echo util_make_url('/account/login.php'); ?>" method="post">
 <input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>"/>

Modified: trunk/gforge/www/include/exit.php
===================================================================
--- trunk/gforge/www/include/exit.php	2010-05-27 10:31:53 UTC (rev 9922)
+++ trunk/gforge/www/include/exit.php	2010-05-27 10:32:05 UTC (rev 9923)
@@ -43,7 +43,7 @@
  */
 function exit_not_logged_in() {
 	//instead of a simple error page, now take them to the login page
-	header ("Location: ".util_make_url ("/account/login.php?return_to=".urlencode(getStringFromServer('REQUEST_URI'))));
+	header ("Location: ".util_make_url ("/account/login.php?triggered=1&return_to=".urlencode(getStringFromServer('REQUEST_URI'))));
 	exit;
 }
 




More information about the Fusionforge-commits mailing list