r22065 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22064‎ | r22065 | r22066 >
Date:15:36, 10 May 2007
Author:river
Status:old
Tags:
Comment:
when $threshold is 0, page_len and page_is_redirect are not present in $s; causes PHP errors and spurious stub display
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -4074,9 +4074,10 @@
40754075 $linkCache->addGoodLinkObj( $s->page_id, $title );
40764076 $this->mOutput->addLink( $title, $s->page_id );
40774077
4078 - $colours[$pdbk] = ( $s->page_len >= $threshold || # always true if $threshold <= 0
4079 - $s->page_is_redirect ||
4080 - !Namespace::isContent( $s->page_namespace )
 4078+ $colours[$pdbk] = ( $threshold == 0 || (
 4079+ $s->page_len >= $threshold || # always true if $threshold <= 0
 4080+ $s->page_is_redirect ||
 4081+ !Namespace::isContent( $s->page_namespace ) )
40814082 ? 1 : 2 );
40824083 }
40834084 }