r16828 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r16827‎ | r16828 | r16829 >
Date:03:34, 7 October 2006
Author:rainman
Status:old
Tags:
Comment:

If $wgVariantArticlePath is false, set at runtime the default
value. (removed variable from config/index.php)
Modified paths:
  • /branches/SerbianVariants/phase3/config/index.php (modified) (history)
  • /branches/SerbianVariants/phase3/includes/DefaultSettings.php (modified) (history)
  • /branches/SerbianVariants/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: branches/SerbianVariants/phase3/includes/Title.php
@@ -876,9 +876,12 @@
877877 * @access public
878878 */
879879 function getLocalVariantURL( $variant='' ) {
880 - global $wgVariantArticlePath;
 880+ global $wgVariantArticlePath,$wgScript;
881881 if($variant=='') return $this->getLocalURL();
882882
 883+ if($wgVariantArticlePath==false)
 884+ $wgVariantArticlePath = "$wgScript?title=$1&variant=$2";
 885+
883886 $dbkey = wfUrlencode( $this->getPrefixedDBkey() );
884887 $url = str_replace( '$1', $dbkey, $wgVariantArticlePath );
885888 $code = urlencode( $variant );
Index: branches/SerbianVariants/phase3/includes/DefaultSettings.php
@@ -124,7 +124,7 @@
125125 $wgStyleDirectory = "{$IP}/skins";
126126 $wgStyleSheetPath = &$wgStylePath;
127127 $wgArticlePath = "{$wgScript}?title=$1";
128 -$wgVariantArticlePath = "{$wgScript}?title=$1&variant=$2";
 128+$wgVariantArticlePath = false;
129129 $wgUploadPath = "{$wgScriptPath}/images";
130130 $wgUploadDirectory = "{$IP}/images";
131131 $wgHashedUploadDirectory = true;
Index: branches/SerbianVariants/phase3/config/index.php
@@ -1357,7 +1357,6 @@
13581358 ## If using PHP as a CGI module, the ?title= style usually must be used.
13591359 {$pretty}\$wgArticlePath = \"\$wgScript/\$1\";
13601360 {$ugly}\$wgArticlePath = \"\$wgScript?title=\$1\";
1361 -\$wgVariantArticlePath = \"\$wgScript?title=\$1&variant=\$2\";
13621361
13631362 \$wgStylePath = \"\$wgScriptPath/skins\";
13641363 \$wgStyleDirectory = \"\$IP/skins\";