[Fusionforge-commits] r9922 - trunk/gforge/www/account

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


Author: lolando
Date: 2010-05-27 12:31:53 +0200 (Thu, 27 May 2010)
New Revision: 9922

Modified:
   trunk/gforge/www/account/login.php
Log:
Fixed the return_to for login.php called from Mediawiki

Modified: trunk/gforge/www/account/login.php
===================================================================
--- trunk/gforge/www/account/login.php	2010-05-26 06:33:25 UTC (rev 9921)
+++ trunk/gforge/www/account/login.php	2010-05-27 10:31:53 UTC (rev 9922)
@@ -43,9 +43,17 @@
 //
 if ($return_to) {
 	$tmpreturn=explode('?',$return_to);
-	if (!@is_file(forge_get_config('url_root').$tmpreturn[0]) && !@is_dir(forge_get_config('url_root').$tmpreturn[0]) && !(strpos($tmpreturn[0],'projects') == 1) && !(strpos($tmpreturn[0],'mediawiki') == 1)) {
-		$return_to='';
+	$rtpath = $tmpreturn[0] ;
+
+	if (@is_file(forge_get_config('url_root').$rtpath)
+	    || @is_dir(forge_get_config('url_root').$rtpath)
+	    || (strpos($rtpath,'/projects') == 0)
+	    || (strpos($rtpath,'/plugins/mediawiki') == 0)) {
+		$newrt = $return_to ;
+	} else {
+		$newrt = '' ;
 	}
+	$return_to = $newrt ;
 }
 
 if (forge_get_config('use_ssl') && !session_issecure()) {




More information about the Fusionforge-commits mailing list