From 6b0d4abc6482442996d77c93631e474b07ea05a2 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 25 Nov 2010 22:22:53 +0000 Subject: [PATCH] Revert r77297, Won't be reverting MimeMagic Mainly whitespace reverts here --- includes/EditPage.php | 4 +++- includes/HistoryPage.php | 4 +++- includes/ImagePage.php | 3 +-- includes/WatchlistEditor.php | 3 ++- includes/db/DatabasePostgres.php | 1 - .../tests/phpunit/includes/api/RandomImageGenerator.php | 1 + 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index b878c6d20a..1182ef7995 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2232,7 +2232,9 @@ HTML $script = ''; foreach ( $toolarray as $tool ) { - if ( !$tool ) continue; + if ( !$tool ) { + continue; + } $params = array( $image = $wgStylePath . '/common/images/' . $tool['image'], diff --git a/includes/HistoryPage.php b/includes/HistoryPage.php index d45d08ce4f..88a8ee44fd 100644 --- a/includes/HistoryPage.php +++ b/includes/HistoryPage.php @@ -538,7 +538,9 @@ class HistoryPager extends ReverseChronologicalPager { $rev->isDeleted( Revision::DELETED_RESTRICTED ), false ); } } - if( $del ) $s .= " $del "; + if ( $del ) { + $s .= " $del "; + } $s .= " $link"; $s .= " " . diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 24999eb6db..a1b204fbd6 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -331,8 +331,6 @@ class ImagePage extends Article { $height_orig = $this->displayImg->getHeight( $page ); $height = $height_orig; - $showLink = false; - $linkAttribs = array( 'href' => $full_url ); $longDesc = $this->displayImg->getLongDesc(); wfRunHooks( 'ImageOpenShowImageInlineBefore', array( &$this, &$wgOut ) ); @@ -1011,6 +1009,7 @@ class ImageHistoryList { } $row .= ''; + $rowClass = null; wfRunHooks( 'ImagePageFileHistoryLine', array( $this, $file, &$row, &$rowClass ) ); $classAttr = $rowClass ? " class='$rowClass'" : ""; diff --git a/includes/WatchlistEditor.php b/includes/WatchlistEditor.php index 8850d26053..dda1b4a169 100644 --- a/includes/WatchlistEditor.php +++ b/includes/WatchlistEditor.php @@ -347,7 +347,8 @@ class WatchlistEditor { */ private function showNormalForm( $output, $user ) { global $wgUser; - if( ( $count = $this->showItemCount( $output, $user ) ) > 0 ) { + $count = $this->showItemCount( $output, $user ); + if( $count > 0 ) { $self = SpecialPage::getTitleFor( 'Watchlist' ); $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl( array( 'action' => 'edit' ) ) ) ); diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index 79816c2081..ecf67de2a3 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -751,7 +751,6 @@ class DatabasePostgres extends DatabaseBase { return true; } return false; - } /** diff --git a/maintenance/tests/phpunit/includes/api/RandomImageGenerator.php b/maintenance/tests/phpunit/includes/api/RandomImageGenerator.php index 8602196724..f544a71129 100644 --- a/maintenance/tests/phpunit/includes/api/RandomImageGenerator.php +++ b/maintenance/tests/phpunit/includes/api/RandomImageGenerator.php @@ -203,6 +203,7 @@ class RandomImageGenerator { $args[] = $filename; $command = wfEscapeShellArg( $wgImageMagickConvertCommand ) . " " . implode( " ", $args ); + $retval = null; $output = wfShellExec( $command, $retval ); return ( $retval === 0 ); } -- 2.20.1