r1280 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r1279‎ | r1280 | r1281 >
Date:03:54, 10 April 2003
Author:vibber
Status:old
Tags:
Comment:
Option to switch comma count for link count (simplified)
Modified paths:
  • /trunk/phpwiki/newcodebase/Article.php (modified) (history)
  • /trunk/phpwiki/newcodebase/DefaultSettings.php (modified) (history)

Diff [purge]

Index: trunk/phpwiki/newcodebase/Article.php
@@ -185,11 +185,12 @@
186186
187187 function isCountable( $text )
188188 {
189 - global $wgTitle;
 189+ global $wgTitle, $wgUseCommaCount;
190190
191191 if ( 0 != $wgTitle->getNamespace() ) { return 0; }
192192 if ( preg_match( "/^#redirect/i", $text ) ) { return 0; }
193 - if ( false === strstr( $text, "," ) ) { return 0; }
 193+ $token = ($wgUseCommaCount ? "," : "[[" );
 194+ if ( false === strstr( $text, $token ) ) { return 0; }
194195 return 1;
195196 }
196197
Index: trunk/phpwiki/newcodebase/DefaultSettings.php
@@ -58,11 +58,16 @@
5959
6060 $wgAllowExternalImages = true;
6161 $wgMiserMode = false; # Disable database-intensive features
62 -$wgUseTeX = false;
 62+$wgUseTeX = true; #false;
6363 $wgUseNewInterlanguage = false;
6464 $wgProfiling = false; # Enable for more detailed by-function times in debug log
6565
6666 $wgAmericanDates = false; # Enable for English module to print dates
6767 # as Mar 3, 2003 rather than 3 Mar 2003
6868
 69+$wgUseCommaCount = false; # If true, article count will only include
 70+ # those with commas (","). If false, will only
 71+ # count those with links ("[[").
 72+
 73+
6974 ?>

Status & tagging log