dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9d6c1f1
)
Fix category browser. $this is not defined in a method subfunction so we have to...
author
Antoine Musso
<hashar@users.mediawiki.org>
Wed, 23 Feb 2005 22:25:00 +0000
(22:25 +0000)
committer
Antoine Musso
<hashar@users.mediawiki.org>
Wed, 23 Feb 2005 22:25:00 +0000
(22:25 +0000)
includes/Skin.php
patch
|
blob
|
history
diff --git
a/includes/Skin.php
b/includes/Skin.php
index
46c2cb9
..
9baec63
100644
(file)
--- a/
includes/Skin.php
+++ b/
includes/Skin.php
@@
-414,7
+414,8
@@
class Skin extends Linker {
$parenttree = $wgTitle->getParentCategoryTree();
# Render the array as a serie of links
$parenttree = $wgTitle->getParentCategoryTree();
# Render the array as a serie of links
- function walkThrough ($tree) {
+ # Need to give skin cause $this is undefined at this level
+ function walkThrough ($tree, &$skin) {
$return = '';
foreach($tree as $element => $parent) {
if(empty($parent)) {
$return = '';
foreach($tree as $element => $parent) {
if(empty($parent)) {
@@
-422,17
+423,19
@@
class Skin extends Linker {
$return .= '<br />';
} else {
# grab the others elements
$return .= '<br />';
} else {
# grab the others elements
- $return .= walkThrough($parent);
+ $return .= walkThrough($parent
, $skin
);
}
# add our current element to the list
$eltitle = Title::NewFromText($element);
# FIXME : should be makeLink() [AV]
}
# add our current element to the list
$eltitle = Title::NewFromText($element);
# FIXME : should be makeLink() [AV]
- $return .= $
this
->makeLinkObj( $eltitle, $eltitle->getText() ) . ' > ';
+ $return .= $
skin
->makeLinkObj( $eltitle, $eltitle->getText() ) . ' > ';
}
return $return;
}
}
return $return;
}
- $s .= walkThrough($parenttree);
+ # Skin object passed by reference cause it can not be
+ # accessed under the method subfunction walkThrough.
+ $s .= walkThrough($parenttree, $this);
}
return $s;
}
return $s;