[Fusionforge-commits] r10937 - trunk/src/plugins/mediawiki/www

Roland Mas lolando at libremir.placard.fr.eu.org
Mon Oct 11 11:12:31 CEST 2010


Author: lolando
Date: 2010-10-11 11:12:31 +0200 (Mon, 11 Oct 2010)
New Revision: 10937

Modified:
   trunk/src/plugins/mediawiki/www/LocalSettings.php
Log:
Taken from Evolvis: return_to URLs for login/logout links in Mediawiki

Modified: trunk/src/plugins/mediawiki/www/LocalSettings.php
===================================================================
--- trunk/src/plugins/mediawiki/www/LocalSettings.php	2010-10-11 08:58:40 UTC (rev 10936)
+++ trunk/src/plugins/mediawiki/www/LocalSettings.php	2010-10-11 09:12:31 UTC (rev 10937)
@@ -311,6 +311,8 @@
 $wgHooks['PersonalUrls'][]='NoLinkOnMainPage';
 
 class SpecialForgeRedir extends SpecialPage {
+	var $dstappendself = false;
+
 	function getTitle() {
 		return 'SpecialForgeRedir';
 	}
@@ -324,12 +326,17 @@
 	}
 
 	function getFullUrl() {
-		return util_make_url($this->dst);
+		$u = $this->dst;
+		if ($this->dstappendself) {
+			$u .= urlencode(getStringFromServer('REQUEST_URI'));
+		}
+		return util_make_url($u);
 	}
 }
 
 class SpecialForgeRedirLogin extends SpecialForgeRedir {
-	var $dst = '/account/login.php';
+	var $dstappendself = true;
+	var $dst = '/account/login.php?return_to=';
 }
 
 class SpecialForgeRedirCreateAccount extends SpecialForgeRedir {
@@ -341,7 +348,8 @@
 }
 
 class SpecialForgeRedirLogout extends SpecialForgeRedir {
-	var $dst = '/account/logout.php';
+	var $dstappendself = true;
+	var $dst = '/account/logout.php?return_to=';
 }
 
 function DisableLogInOut(&$mList) {




More information about the Fusionforge-commits mailing list