Index: trunk/phase3/includes/Skin.php |
— | — | @@ -414,7 +414,8 @@ |
415 | 415 | $parenttree = $wgTitle->getParentCategoryTree(); |
416 | 416 | |
417 | 417 | # Render the array as a serie of links |
418 | | - function walkThrough ($tree) { |
| 418 | + # Need to give skin cause $this is undefined at this level |
| 419 | + function walkThrough ($tree, &$skin) { |
419 | 420 | $return = ''; |
420 | 421 | foreach($tree as $element => $parent) { |
421 | 422 | if(empty($parent)) { |
— | — | @@ -422,17 +423,19 @@ |
423 | 424 | $return .= '<br />'; |
424 | 425 | } else { |
425 | 426 | # grab the others elements |
426 | | - $return .= walkThrough($parent); |
| 427 | + $return .= walkThrough($parent, $skin); |
427 | 428 | } |
428 | 429 | # add our current element to the list |
429 | 430 | $eltitle = Title::NewFromText($element); |
430 | 431 | # FIXME : should be makeLink() [AV] |
431 | | - $return .= $this->makeLinkObj( $eltitle, $eltitle->getText() ) . ' > '; |
| 432 | + $return .= $skin->makeLinkObj( $eltitle, $eltitle->getText() ) . ' > '; |
432 | 433 | } |
433 | 434 | return $return; |
434 | 435 | } |
435 | 436 | |
436 | | - $s .= walkThrough($parenttree); |
| 437 | + # Skin object passed by reference cause it can not be |
| 438 | + # accessed under the method subfunction walkThrough. |
| 439 | + $s .= walkThrough($parenttree, $this); |
437 | 440 | } |
438 | 441 | |
439 | 442 | return $s; |