Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2692
bug5477.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 9:10 PM
2014-11-21 21:10:06 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
bug5477.diff
View Options
Index: CategoryPage.php
===================================================================
--- CategoryPage.php (revision 14100)
+++ CategoryPage.php (working copy)
@@ -83,7 +83,7 @@
$limit = $wgCategoryPagingLimit;
$res = $dbr->select(
array( 'page', 'categorylinks' ),
- array( 'page_title', 'page_namespace', 'page_len', 'cl_sortkey' ),
+ array( 'page_title', 'page_namespace', 'page_is_redirect', 'page_len', 'cl_sortkey' ),
array( $pageCondition,
'cl_from = page_id',
'cl_to' => $this->mTitle->getDBKey()),
@@ -131,7 +131,7 @@
}
} else {
// Page in this category
- array_push( $articles, $sk->makeSizeLinkObj( $x->page_len, $title, $wgContLang->convert( $title->getPrefixedText() ) ) ) ;
+ array_push( $articles, $sk->makeSizeLinkObj( $x->page_len, $x->page_is_redirect, $title, $wgContLang->convert( $title->getPrefixedText() ) ) ) ;
array_push( $articles_start_char, $wgContLang->convert( $wgContLang->firstChar( $x->cl_sortkey ) ) );
}
}
Index: Linker.php
===================================================================
--- Linker.php (revision 14100)
+++ Linker.php (working copy)
@@ -399,6 +399,7 @@
* on the given page size.
*
* @param $size Integer
+ * @param $isredirect Bool
* @param $nt Title object.
* @param $text String
* @param $query String
@@ -406,10 +407,10 @@
* @param $prefix String
* @return string HTML of link
*/
- function makeSizeLinkObj( $size, $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
+ function makeSizeLinkObj( $size, $isredirect, $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
global $wgUser;
$threshold = intval( $wgUser->getOption( 'stubthreshold' ) );
- if( $size < $threshold ) {
+ if( $size < $threshold && $nt->getNamespace() == NS_MAIN && !$isredirect ) {
return $this->makeStubLinkObj( $nt, $text, $query, $trail, $prefix );
} else {
return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix );
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2267
Default Alt Text
bug5477.diff (1 KB)
Attached To
Mode
T7477: Categorized redirect is shown as stub in Category page
Attached
Detach File
Event Timeline
Log In to Comment