Index: trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php |
— | — | @@ -137,6 +137,18 @@ |
138 | 138 | $this->doInlineEditForm(); |
139 | 139 | return false; |
140 | 140 | } |
| 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 | + } |
141 | 153 | |
142 | 154 | self::addJSandCSS(); |
143 | 155 | $this->output->setSubtitle( $this->getSubtitle() ); |
Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php |
— | — | @@ -183,6 +183,17 @@ |
184 | 184 | $this->output->setPageTitle( $this->title->getPrefixedText() ); |
185 | 185 | self::addJSandCSS(); |
186 | 186 | |
| 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 | + |
187 | 198 | $sk = $this->user->getSkin(); |
188 | 199 | |
189 | 200 | $article = new Article( $this->title ); |