Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -1179,7 +1179,7 @@ |
1180 | 1180 | . "AND c.relkind IN ('" . implode( "','", $types ) . "')"; |
1181 | 1181 | $res = $this->query( $SQL ); |
1182 | 1182 | $count = $res ? $res->numRows() : 0; |
1183 | | - return $count ? true : false; |
| 1183 | + return (bool)$count; |
1184 | 1184 | } |
1185 | 1185 | |
1186 | 1186 | /** |
Index: trunk/phase3/includes/installer/WebInstallerPage.php |
— | — | @@ -487,7 +487,7 @@ |
488 | 488 | // Title-style validation |
489 | 489 | $title = Title::newFromText( $name ); |
490 | 490 | if ( !$title ) { |
491 | | - $good = $nsType == 'site-name' ? true : false; |
| 491 | + $good = $nsType == 'site-name'; |
492 | 492 | } else { |
493 | 493 | $name = $title->getDBkey(); |
494 | 494 | $good = true; |
Index: trunk/phase3/includes/WebRequest.php |
— | — | @@ -345,7 +345,7 @@ |
346 | 346 | * @return Boolean |
347 | 347 | */ |
348 | 348 | public function getBool( $name, $default = false ) { |
349 | | - return $this->getVal( $name, $default ) ? true : false; |
| 349 | + return (bool)$this->getVal( $name, $default ); |
350 | 350 | } |
351 | 351 | |
352 | 352 | /** |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -659,7 +659,7 @@ |
660 | 660 | self::checkTitle( $title, $name ); |
661 | 661 | return array( |
662 | 662 | 'href' => $title->getLocalURL( $urlaction ), |
663 | | - 'exists' => $title->getArticleID() != 0 ? true : false |
| 663 | + 'exists' => $title->getArticleID() != 0, |
664 | 664 | ); |
665 | 665 | } |
666 | 666 | |
— | — | @@ -669,7 +669,7 @@ |
670 | 670 | self::checkTitle( $title, $name ); |
671 | 671 | return array( |
672 | 672 | 'href' => $title->getLocalURL( $urlaction ), |
673 | | - 'exists' => $title->getArticleID() != 0 ? true : false |
| 673 | + 'exists' => $title->getArticleID() != 0, |
674 | 674 | ); |
675 | 675 | } |
676 | 676 | |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -346,9 +346,9 @@ |
347 | 347 | |
348 | 348 | $f .= Xml::fieldset( wfMsg( 'sp-contributions-search' ) ) . |
349 | 349 | Xml::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ), |
350 | | - 'contribs', 'newbie' , 'newbie', $this->opts['contribs'] == 'newbie' ? true : false ) . '<br />' . |
| 350 | + 'contribs', 'newbie' , 'newbie', $this->opts['contribs'] == 'newbie' ) . '<br />' . |
351 | 351 | Xml::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ), |
352 | | - 'contribs' , 'user', 'user', $this->opts['contribs'] == 'user' ? true : false ) . ' ' . |
| 352 | + 'contribs' , 'user', 'user', $this->opts['contribs'] == 'user' ) . ' ' . |
353 | 353 | Html::input( 'target', $this->opts['target'], 'text', array( |
354 | 354 | 'size' => '20', |
355 | 355 | 'required' => '' |
Index: trunk/phase3/includes/specials/SpecialBlockip.php |
— | — | @@ -188,7 +188,7 @@ |
189 | 189 | list( $show, $value ) = explode( ':', $option ); |
190 | 190 | $show = htmlspecialchars( $show ); |
191 | 191 | $value = htmlspecialchars( $value ); |
192 | | - $blockExpiryFormOptions .= Xml::option( $show, $value, $this->BlockExpiry === $value ? true : false ) . "\n"; |
| 192 | + $blockExpiryFormOptions .= Xml::option( $show, $value, $this->BlockExpiry === $value ) . "\n"; |
193 | 193 | } |
194 | 194 | |
195 | 195 | $reasonDropDown = Xml::listDropDown( 'wpBlockReasonList', |
Index: trunk/phase3/includes/specials/SpecialAllmessages.php |
— | — | @@ -100,19 +100,19 @@ |
101 | 101 | 'filter', |
102 | 102 | 'unmodified', |
103 | 103 | 'mw-allmessages-form-filter-unmodified', |
104 | | - ( $this->filter == 'unmodified' ? true : false ) |
| 104 | + ( $this->filter == 'unmodified' ) |
105 | 105 | ) . |
106 | 106 | Xml::radioLabel( wfMsg( 'allmessages-filter-all' ), |
107 | 107 | 'filter', |
108 | 108 | 'all', |
109 | 109 | 'mw-allmessages-form-filter-all', |
110 | | - ( $this->filter == 'all' ? true : false ) |
| 110 | + ( $this->filter == 'all' ) |
111 | 111 | ) . |
112 | 112 | Xml::radioLabel( wfMsg( 'allmessages-filter-modified' ), |
113 | 113 | 'filter', |
114 | 114 | 'modified', |
115 | 115 | 'mw-allmessages-form-filter-modified', |
116 | | - ( $this->filter == 'modified' ? true : false ) |
| 116 | + ( $this->filter == 'modified' ) |
117 | 117 | ) . |
118 | 118 | "</td>\n |
119 | 119 | </tr> |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | Xml::openElement( 'select', array( 'id' => 'mw-allmessages-form-lang', 'name' => 'lang' ) ); |
126 | 126 | |
127 | 127 | foreach( $languages as $lang => $name ) { |
128 | | - $selected = $lang == $this->langCode ? true : false; |
| 128 | + $selected = $lang == $this->langCode; |
129 | 129 | $out .= Xml::option( $lang . ' - ' . $name, $lang, $selected ) . "\n"; |
130 | 130 | } |
131 | 131 | $out .= Xml::closeElement( 'select' ) . |
Index: trunk/phase3/includes/specials/SpecialSearch.php |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | if( empty( $this->namespaces ) ) { |
69 | 69 | $this->namespaces = SearchEngine::userNamespaces( $user ); |
70 | 70 | } |
71 | | - $this->searchRedirects = $request->getcheck( 'redirs' ) ? true : false; |
| 71 | + $this->searchRedirects = $request->getCheck( 'redirs' ); |
72 | 72 | $this->searchAdvanced = $request->getVal( 'advanced' ); |
73 | 73 | $this->active = 'advanced'; |
74 | 74 | $this->sk = $user->getSkin(); |
Index: trunk/phase3/includes/Autopromote.php |
— | — | @@ -143,7 +143,7 @@ |
144 | 144 | throw new MWException( "Unrecognized condition {$cond[0]} for autopromotion!" ); |
145 | 145 | } |
146 | 146 | |
147 | | - return $result ? true : false; |
| 147 | + return (bool)$result; |
148 | 148 | } |
149 | 149 | } |
150 | 150 | } |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -2046,7 +2046,7 @@ |
2047 | 2047 | |
2048 | 2048 | return array( |
2049 | 2049 | 'href' => $title->getLocalURL( $urlaction ), |
2050 | | - 'exists' => $title->getArticleID() != 0 ? true : false |
| 2050 | + 'exists' => $title->getArticleID() != 0; |
2051 | 2051 | ); |
2052 | 2052 | } |
2053 | 2053 | |