Am 12.03.2012 07:09, schrieb Dmitriy Sintsov:
- Thomas Gries mail@tgries.de [Sun, 11 Mar 2012 22:38:10 +0100]:
Can someone help me, please:
I need the $article object (the article page, where the LinkEnd hook
is
called) inside a function called by hook LinkEnd.
- because I want to modifiy some links in the hooked function,
but only on articles where the raw text contains some strings in E:WikiArticleFeeds .
function onLinkEnd( $skin, Title $target, array $options, &$text, array &$attribs, &$ret ) { $article = new Article( $target, 0 ); }
Or, you need to get exactly $wgArticle but without declaring it as global? Then I don't know how.
Dmitriy
Dmitriy, the second argument ( $target ) is the link target (article object) which is/has been processed by the linker, not the article, on which this link was processed. This is, what I need.
It appears. that the whole Linker.php module does not refer to that, because it is usually irrelevant for forming links.