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

Roland Mas lolando at libremir.placard.fr.eu.org
Tue Sep 14 15:07:27 CEST 2010


Author: lolando
Date: 2010-09-14 15:07:26 +0200 (Tue, 14 Sep 2010)
New Revision: 10472

Modified:
   trunk/src/plugins/mediawiki/www/LocalSettings.php
Log:
Merged from Evolvis: redirect to FF's login page (and related) rather than disabling the Mediawiki link

Modified: trunk/src/plugins/mediawiki/www/LocalSettings.php
===================================================================
--- trunk/src/plugins/mediawiki/www/LocalSettings.php	2010-09-14 13:00:37 UTC (rev 10471)
+++ trunk/src/plugins/mediawiki/www/LocalSettings.php	2010-09-14 13:07:26 UTC (rev 10472)
@@ -219,11 +219,45 @@
 }
 $wgHooks['PersonalUrls'][]='NoLinkOnMainPage';
 
+class SpecialForgeRedir extends SpecialPage {
+	function getTitle() {
+		return 'SpecialForgeRedir';
+	}
+
+	function getRedirect() {
+		return $this;
+	}
+
+	function getRedirectQuery() {
+		return $this;
+	}
+
+	function getFullUrl() {
+		return util_make_url($this->dst);
+	}
+}
+
+class SpecialForgeRedirLogin extends SpecialForgeRedir {
+	var $dst = '/account/login.php';
+}
+
+class SpecialForgeRedirCreateAccount extends SpecialForgeRedir {
+	var $dst = '/account/register.php';
+}
+
+class SpecialForgeRedirResetPass extends SpecialForgeRedir {
+	var $dst = '/account/lostpw.php';
+}
+
+class SpecialForgeRedirLogout extends SpecialForgeRedir {
+	var $dst = '/account/logout.php';
+}
+
 function DisableLogInOut(&$mList) {
-	unset($mList['Userlogin']);
-	unset($mList['CreateAccount']);
-	unset($mList['Resetpass']);
-	unset($mList['Userlogout']);
+	$mList['Userlogin'] = 'SpecialForgeRedirLogin';
+	$mList['CreateAccount'] = 'SpecialForgeRedirCreateAccount';
+	$mList['Resetpass'] = 'SpecialForgeRedirResetPass';
+	$mList['Userlogout'] = 'SpecialForgeRedirLogout';
 	return true;
 }
 $GLOBALS['wgHooks']['SpecialPage_initList'][] = 'DisableLogInOut';




More information about the Fusionforge-commits mailing list