changeable or all unchangeable
* Fix fatal error on calling PAGESINCATEGORY with invalid category name
* (bug 13793) Special:Whatlinkshere filters wrong - after paginating instead of before
+* (bug 13796) Show links to parent pages even if some of them are missing
=== API changes in 1.13 ===
$ptext=$wgTitle->getPrefixedText();
if(preg_match('/\//',$ptext)) {
$links = explode('/',$ptext);
+ array_pop( $links );
$c = 0;
$growinglink = '';
+ $display = '';
foreach($links as $link) {
- $c++;
- if ($c<count($links)) {
- $growinglink .= $link;
- $getlink = $this->makeLink( $growinglink, htmlspecialchars( $link ) );
- if(preg_match('/class="new"/i',$getlink)) { break; } # this is a hack, but it saves time
+ $growinglink .= $link;
+ $display .= $link;
+ $linkObj = Title::newFromText( $growinglink );
+ if( $linkObj->exists() ){
+ $getlink = $this->makeKnownLinkObj( $linkObj, htmlspecialchars( $display ) );
+ $c++;
if ($c>1) {
$subpages .= ' | ';
} else {
$subpages .= '< ';
}
$subpages .= $getlink;
- $growinglink .= '/';
+ $display = '';
+ } else {
+ $display .= '/';
}
+ $growinglink .= '/';
}
}
}