Index: trunk/phase3/includes/Linker.php |
— | — | @@ -224,7 +224,7 @@ |
225 | 225 | $retVal = $this->makeBrokenLinkObj( $nt, $text, $query, $trail, $prefix ); |
226 | 226 | } else { |
227 | 227 | $stub = false; |
228 | | - if ( $nt->getNamespace() == NS_MAIN ) { |
| 228 | + if ( $nt->isContentPage() ) { |
229 | 229 | $threshold = $wgUser->getOption('stubthreshold'); |
230 | 230 | if ( $threshold > 0 ) { |
231 | 231 | $dbr = wfGetDB( DB_SLAVE ); |
Index: trunk/phase3/includes/Parser.php |
— | — | @@ -4074,16 +4074,10 @@ |
4075 | 4075 | $linkCache->addGoodLinkObj( $s->page_id, $title ); |
4076 | 4076 | $this->mOutput->addLink( $title, $s->page_id ); |
4077 | 4077 | |
4078 | | - if ( $threshold > 0 ) { |
4079 | | - $size = $s->page_len; |
4080 | | - if ( $s->page_is_redirect || $s->page_namespace != 0 || $size >= $threshold ) { |
4081 | | - $colours[$pdbk] = 1; |
4082 | | - } else { |
4083 | | - $colours[$pdbk] = 2; |
4084 | | - } |
4085 | | - } else { |
4086 | | - $colours[$pdbk] = 1; |
4087 | | - } |
| 4078 | + $colours[$pdbk] = ( $s->page_len >= $threshold || # always true if $threshold <= 0 |
| 4079 | + $s->page_is_redirect || |
| 4080 | + !Namespace::isContent( $s->page_namespace ) |
| 4081 | + ? 1 : 2 ); |
4088 | 4082 | } |
4089 | 4083 | } |
4090 | 4084 | wfProfileOut( $fname.'-check' ); |