fix some spacing
[lhc/web/wiklou.git] / includes / specials / SpecialRecentchanges.php
index 6502c72..69c291d 100644 (file)
@@ -42,16 +42,16 @@ class SpecialRecentChanges extends IncludableSpecialPage {
        public function getDefaultOptions() {
                $opts = new FormOptions();
 
-               $opts->add( 'days',  (int)$this->getUser()->getOption( 'rcdays' ) );
-               $opts->add( 'limit', (int)$this->getUser()->getOption( 'rclimit' ) );
+               $opts->add( 'days', $this->getUser()->getIntOption( 'rcdays' ) );
+               $opts->add( 'limit', $this->getUser()->getIntOption( 'rclimit' ) );
                $opts->add( 'from', '' );
 
-               $opts->add( 'hideminor',     $this->getUser()->getBoolOption( 'hideminor' ) );
-               $opts->add( 'hidebots',      true  );
-               $opts->add( 'hideanons',     false );
-               $opts->add( 'hideliu',       false );
+               $opts->add( 'hideminor', $this->getUser()->getBoolOption( 'hideminor' ) );
+               $opts->add( 'hidebots', true  );
+               $opts->add( 'hideanons', false );
+               $opts->add( 'hideliu', false );
                $opts->add( 'hidepatrolled', $this->getUser()->getBoolOption( 'hidepatrolled' ) );
-               $opts->add( 'hidemyself',    false );
+               $opts->add( 'hidemyself', false );
 
                $opts->add( 'namespace', '', FormOptions::INTNULL );
                $opts->add( 'invert', false );
@@ -129,7 +129,6 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                return $this->rcOptions;
        }
 
-
        /**
         * Main execution point
         *
@@ -232,7 +231,7 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                        }
 
                        if( is_numeric( $bit ) ) {
-                               $opts['limit'] =  $bit;
+                               $opts['limit'] = $bit;
                        }
 
                        $m = array();
@@ -296,7 +295,7 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                $cutoff_unixtime = $cutoff_unixtime - ($cutoff_unixtime % 86400);
                $cutoff = $dbr->timestamp( $cutoff_unixtime );
 
-               $fromValid = preg_match('/^[0-9]{14}$/', $opts['from']);
+               $fromValid = preg_match( '/^[0-9]{14}$/', $opts['from'] );
                if( $fromValid && $opts['from'] > wfTimestamp( TS_MW, $cutoff ) ) {
                        $cutoff = $dbr->timestamp( $opts['from'] );
                } else {
@@ -340,7 +339,7 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                if( $opts['namespace'] !== '' ) {
                        $selectedNS = $dbr->addQuotes( $opts['namespace'] );
                        $operator = $opts['invert'] ? '!='  : '=';
-                       $boolean  = $opts['invert'] ? 'AND' : 'OR';
+                       $boolean = $opts['invert'] ? 'AND' : 'OR';
 
                        # namespace association (bug 2429)
                        if( !$opts['associated'] ) {
@@ -351,8 +350,8 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                                        MWNamespace::getAssociated( $opts['namespace'] )
                                );
                                $condition = "(rc_namespace $operator $selectedNS "
-                                                  . $boolean
-                                                  . " rc_namespace $operator $associatedNS)";
+                                       . $boolean
+                                       . " rc_namespace $operator $associatedNS)";
                        }
 
                        $conds[] = $condition;
@@ -387,7 +386,7 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                        $tables[] = 'watchlist';
                        $fields[] = 'wl_user';
                        $fields[] = 'wl_notificationtimestamp';
-                       $join_conds['watchlist'] = array('LEFT JOIN', array(
+                       $join_conds['watchlist'] = array( 'LEFT JOIN', array(
                                'wl_user' => $uid,
                                'wl_title=rc_title',
                                'wl_namespace=rc_namespace'
@@ -396,7 +395,7 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                if ( $this->getUser()->isAllowed( 'rollback' ) ) {
                        $tables[] = 'page';
                        $fields[] = 'page_latest';
-                       $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
+                       $join_conds['page'] = array( 'LEFT JOIN', 'rc_cur_id=page_id' );
                }
                // Tag stuff.
                ChangeTags::modifyDisplayQuery(
@@ -545,7 +544,7 @@ class SpecialRecentChanges extends IncludableSpecialPage {
 
        /**
         * Get the query string to append to feed link URLs.
-        * 
+        *
         * @return string
         */
        public function getFeedQuery() {
@@ -863,7 +862,6 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                }
                $dl = $lang->pipeList( $dl );
 
-
                // show/hide links
                $showhide = array( $this->msg( 'show' )->text(), $this->msg( 'hide' )->text() );
                $filters = array(