// Paste PHP Code
Index: Article.php
===================================================================
--- Article.php (revision 21904)
+++ Article.php (working copy)
@@ -398,19 +398,26 @@
$this->mCommentsCount = wfArrayVal($page, 'comments/@count');
$this->mTags = wfArrayValAll($page, 'tags/tag', array());
- $wgOut->setTagCount(!is_null($this->mTags) ? count($this->mTags): 0);
+
$files = wfArrayValAll($page, 'files/file', array());
$this->setFiles($files);
+
// load some page metrics
$this->mMetrics = array(
'charcount' => wfArrayVal($page, 'metrics/metric.charcount', 0),
'views' => wfArrayVal($page, 'metrics/metric.views', 0)
);
$this->mMetrics['revisions'] = wfArrayVal($page, 'revisions/@count', 0);
+
+ // only update skinning variables for the global article
+ if (!is_null($wgArticle) && ($this->getId() == $wgArticle->getId()))
+ {
+ // @note guerrics: why is this in here!
+ $wgOut->setTagCount(!is_null($this->mTags) ? count($this->mTags) : 0);
+ $wgOut->setBackLinks(wfArrayValAll($page, 'inbound/page'));
+ $wgOut->setPageMetrics($this->mMetrics); // make variable available for skinning
+ }
- $wgOut->setBackLinks(wfArrayValAll($page, 'inbound/page'));
- $wgOut->setPageMetrics($this->mMetrics); // make variable available for skinning
-
// If this page has been redirected from somewhere else, update the title accordingly
$redirects = wfArrayVal($page, 'page.redirectedfrom');
if (!is_null($redirects) && $redirects != '')
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by