Merge "Fixed Bug 40464 Placeholder attribute of searchInput element"
[lhc/web/wiklou.git] / includes / api / ApiFeedContributions.php
index fb6a06f..a11563b 100644 (file)
  */
 class ApiFeedContributions extends ApiBase {
 
-       public function __construct( $main, $action ) {
-               parent::__construct( $main, $action );
-       }
-
        /**
         * This module uses a custom feed wrapper printer.
         *
@@ -47,11 +43,11 @@ class ApiFeedContributions extends ApiBase {
 
                global $wgFeed, $wgFeedClasses, $wgSitename, $wgLanguageCode;
 
-               if( !$wgFeed ) {
+               if ( !$wgFeed ) {
                        $this->dieUsage( 'Syndication feeds are not available', 'feed-unavailable' );
                }
 
-               if( !isset( $wgFeedClasses[ $params['feedformat'] ] ) ) {
+               if ( !isset( $wgFeedClasses[$params['feedformat']] ) ) {
                        $this->dieUsage( 'Invalid subscription feed type', 'feed-invalid' );
                }
 
@@ -86,7 +82,7 @@ class ApiFeedContributions extends ApiBase {
                ) );
 
                $feedItems = array();
-               if( $pager->getNumRows() > 0 ) {
+               if ( $pager->getNumRows() > 0 ) {
                        foreach ( $pager->mResult as $row ) {
                                $feedItems[] = $this->feedItem( $row );
                        }
@@ -97,7 +93,7 @@ class ApiFeedContributions extends ApiBase {
 
        protected function feedItem( $row ) {
                $title = Title::makeTitle( intval( $row->page_namespace ), $row->page_title );
-               if( $title ) {
+               if ( $title ) {
                        $date = $row->rev_timestamp;
                        $comments = $title->getTalkPage()->getFullURL();
                        $revision = Revision::newFromRow( $row );
@@ -128,7 +124,7 @@ class ApiFeedContributions extends ApiBase {
         * @return string
         */
        protected function feedItemDesc( $revision ) {
-               if( $revision ) {
+               if ( $revision ) {
                        $msg = wfMessage( 'colon-separator' )->inContentLanguage()->text();
                        $content = $revision->getContent();
 
@@ -153,7 +149,7 @@ class ApiFeedContributions extends ApiBase {
        public function getAllowedParams() {
                global $wgFeedClasses;
                $feedFormatNames = array_keys( $wgFeedClasses );
-               return array (
+               return array(
                        'feedformat' => array(
                                ApiBase::PARAM_DFLT => 'rss',
                                ApiBase::PARAM_TYPE => $feedFormatNames
@@ -213,8 +209,4 @@ class ApiFeedContributions extends ApiBase {
                        'api.php?action=feedcontributions&user=Reedy',
                );
        }
-
-       public function getVersion() {
-               return __CLASS__ . ': $Id$';
-       }
 }