Index: trunk/extensions/LiquidThreads/api/ApiFeedLQTThreads.php |
— | — | @@ -51,8 +51,9 @@ |
52 | 52 | |
53 | 53 | $db = wfGetDB( DB_SLAVE ); |
54 | 54 | |
55 | | - $feedTitle = $this->createFeedTitle( $params ); |
| 55 | + $feedTitle = self::createFeedTitle( $params ); |
56 | 56 | $feedClass = $wgFeedClasses[$params['feedformat']]; |
| 57 | + // TODO need a better URL :) |
57 | 58 | $feedUrl = 'http://www.mediawiki.org/wiki/Extension:LiquidThreads'; |
58 | 59 | $feedItems = array(); |
59 | 60 | |
— | — | @@ -114,7 +115,7 @@ |
115 | 116 | return new FeedItem($titleStr, $completeText, $titleUrl, $timestamp, $user); |
116 | 117 | } |
117 | 118 | |
118 | | - private function createFeedTitle( $params ) { |
| 119 | + public static function createFeedTitle( $params ) { |
119 | 120 | wfLoadExtensionMessages( 'LiquidThreads' ); |
120 | 121 | $fromPlaces = array(); |
121 | 122 | |
— | — | @@ -141,10 +142,10 @@ |
142 | 143 | $msg = 'lqt-feed-title-all'; |
143 | 144 | } elseif ( in_array( 'replies', $types ) ) { |
144 | 145 | $msg = 'lqt-feed-title-replies'; |
145 | | - } elseif ( in_array( 'newthrads', $types ) ) { |
| 146 | + } elseif ( in_array( 'newthreads', $types ) ) { |
146 | 147 | $msg = 'lqt-feed-title-new-threads'; |
147 | 148 | } else { |
148 | | - throw new MWException( "Unable to determine appropriate display type" ); |
| 149 | + throw new MWException( "Unable to determine appropriate display type"); |
149 | 150 | } |
150 | 151 | |
151 | 152 | if ( $fromCount ) { |