improve LocalSettings.php to use domain name instead of directory for edit mode
authorZbigniew Braniecki (zbraniecki@mozilla.com)
Wed, 01 Oct 2008 17:00:06 -0700
changeset 14 94cc4dfb2a10228ffc74a2bf703aecc92bf3e657
parent 13 0d74b245995def8dbc871e8a13a86fc86419bdf6
child 15 72a092f5e4bb2f12ecfc2362efa416ada2ae1dd4
push id3
push userzbraniecki@mozilla.com
push dateThu, 02 Oct 2008 00:00:24 +0000
improve LocalSettings.php to use domain name instead of directory for edit mode
mediawiki/LocalSettings.php
--- a/mediawiki/LocalSettings.php
+++ b/mediawiki/LocalSettings.php
@@ -4,17 +4,17 @@
 # Add support for OpenID in path
 ##
 ini_set("include_path", "./extensions/OpenID:".get_include_path());
 
 ##
 # CMO
 # display end user view or admin view depending on the path element
 ##
-if(strpos($_SERVER['REQUEST_URI'],'como-auth')===FALSE)
+if(strpos($_SERVER['SERVER_NAME'],'como-edit')===FALSE)
   $cmoview = 0;
 else
   $cmoview = 1;
 
 
 # This file was automatically generated by the MediaWiki installer.
 # If you make manual changes, please keep track in case you need to
 # recreate them later.
@@ -45,26 +45,19 @@ if ( $wgCommandLineMode ) {
 	}
 }
 ## Uncomment this to disable output compression
 # $wgDisableOutputCompression = true;
 
 # CMO
 $wgSitename         = "Community Mozilla";
 
-## The URL base path to the directory containing the wiki;
-## defaults for all runtime URL paths are based off of this.
-# CMO
-if ($cmoview==1)
-  $wgScriptPath       = "/mozilla/como-auth";
-else
-  $wgScriptPath       = "/mozilla/como";
+$wgScriptPath       = "";
 $wgScript           = "$wgScriptPath/redirect.php";
 $wgArticlePath      = "$wgScriptPath/$1";
-$wgScriptExtension  = ".php";
 
 ## For more information on customizing the URLs please see:
 ## http://www.mediawiki.org/wiki/Manual:Short_URL
 
 $wgEnableEmail      = true;
 $wgEnableUserEmail  = true;
 
 $wgEmergencyContact = "community@mozilla.org";
@@ -125,17 +118,20 @@ else
 $wgLanguageCode = "en";
 
 $wgProxyKey = "46e12b98327488e382c5702fa877056c89fda1a61db1f7ced70eaac349cf06f3";
 
 ## Default skin: you can change the default skin. Use the internal symbolic
 ## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
 #$wgDefaultSkin = 'monobook';
 # CMO
-$wgDefaultSkin = 'cmo';
+if ($cmoview == 0)
+  $wgDefaultSkin = 'cmo';
+else
+  $wgDefaultSkin = 'monobook';
 
 ## For attaching licensing metadata to pages, and displaying an
 ## appropriate copyright notice / icon. GNU Free Documentation
 ## License and Creative Commons licenses are supported so far.
 # $wgEnableCreativeCommonsRdf = true;
 $wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
 $wgRightsUrl = "";
 $wgRightsText = "";