r57122 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57121‎ | r57122 | r57123 >
Date:17:53, 30 September 2009
Author:werdna
Status:deferred
Tags:
Comment:
Expose LiquidThreads feed links through the proper UI (feed links in the sidebar, <link> tags)
Modified paths:
  • /trunk/extensions/LiquidThreads/pages/TalkpageView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php
@@ -137,6 +137,18 @@
138138 $this->doInlineEditForm();
139139 return false;
140140 }
 141+
 142+ // Expose feed links.
 143+ global $wgFeedClasses, $wgScriptPath, $wgServer;
 144+ $thread = $this->thread->topmostThread()->title()->getPrefixedText();
 145+ $apiParams = array( 'action' => 'feedthreads', 'type' => 'replies|newthreads',
 146+ 'thread' => $thread );
 147+ $urlPrefix = $wgServer . $wgScriptPath."/api.php?";
 148+ foreach( $wgFeedClasses as $format => $class ) {
 149+ $theseParams = $apiParams + array( 'feedformat' => $format );
 150+ $url = $urlPrefix . wfArrayToCGI( $theseParams );
 151+ $this->output->addFeedLink( $format, $url );
 152+ }
141153
142154 self::addJSandCSS();
143155 $this->output->setSubtitle( $this->getSubtitle() );
Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php
@@ -183,6 +183,17 @@
184184 $this->output->setPageTitle( $this->title->getPrefixedText() );
185185 self::addJSandCSS();
186186
 187+ // Expose feed links.
 188+ global $wgFeedClasses, $wgScriptPath, $wgServer;
 189+ $apiParams = array( 'action' => 'feedthreads', 'type' => 'replies|newthreads',
 190+ 'talkpage' => $this->title->getPrefixedText() );
 191+ $urlPrefix = $wgServer . $wgScriptPath."/api.php?";
 192+ foreach( $wgFeedClasses as $format => $class ) {
 193+ $theseParams = $apiParams + array( 'feedformat' => $format );
 194+ $url = $urlPrefix . wfArrayToCGI( $theseParams );
 195+ $this->output->addFeedLink( $format, $url );
 196+ }
 197+
187198 $sk = $this->user->getSkin();
188199
189200 $article = new Article( $this->title );

Follow-up revisions

RevisionCommit summaryAuthorDate
r57145Unmerge r57129 and r57122 from wmf-deployment (LiquidThreads only), breaks be...werdna19:38, 30 September 2009

Status & tagging log