Rohitt-wikipedia has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/312634

Change subject: Change getContent() call from Article to WikiPage
......................................................................

Change getContent() call from Article to WikiPage

Fix Bug T145730: DynamicSidebar should not call Article::getContent()
Switched to calling WikiPage::getContent()

Change-Id: If85cb28dc255173f0eab465ae5447ba6726e6eca
---
M DynamicSidebar.body.php
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DynamicSidebar 
refs/changes/34/312634/1

diff --git a/DynamicSidebar.body.php b/DynamicSidebar.body.php
index 9c4b4ef..b13aab4 100644
--- a/DynamicSidebar.body.php
+++ b/DynamicSidebar.body.php
@@ -108,8 +108,8 @@
                        if ( !$title->exists() ) {
                                continue;
                        }
-                       $revid = $title->getLatestRevID();
-                       $a = new Article( $title, $revid );
+                       // WikiPage will return latest revision by default.
+                       $a = new WikiPage( $title );
                        $text .= $a->getContent() . "\n";
 
                }
@@ -162,8 +162,7 @@
                                self::printDebug( "$category category page 
doesn't exist." );
                                continue;
                        }
-                       $revid = $title->getLatestRevID();
-                       $a = new Article( $title, $revid );
+                       $a = new WikiPage( $title );
                        $text .= $a->getContent() . "\n";
                        self::printDebug( "$category text output is: $text" );
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/312634
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If85cb28dc255173f0eab465ae5447ba6726e6eca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DynamicSidebar
Gerrit-Branch: master
Gerrit-Owner: Rohitt-wikipedia <aero31a...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to