Index: trunk/extensions/Collection/Collection.hooks.php |
— | — | @@ -171,7 +171,7 @@ |
172 | 172 | $showShowAndClearLinks = true; |
173 | 173 | $addRemoveState = ''; |
174 | 174 | |
175 | | - $out = Xml::element( 'ul', array( 'id' => 'collectionPortletList' ), NULL ); |
| 175 | + $out = Xml::element( 'ul', array( 'id' => 'collectionPortletList' ), null ); |
176 | 176 | |
177 | 177 | if( self::_isCollectionPage( $wgTitle, $wgArticle) ) { |
178 | 178 | $out .= Xml::tags( |
— | — | @@ -189,7 +189,7 @@ |
190 | 190 | ) |
191 | 191 | ); |
192 | 192 | $showShowAndClearLinks = false; |
193 | | - } else if( $ajaxHint == 'addcategory' || $namespace == NS_CATEGORY ) { |
| 193 | + } elseif( $ajaxHint == 'addcategory' || $namespace == NS_CATEGORY ) { |
194 | 194 | $addRemoveState = 'addcategory'; |
195 | 195 | $out .= Xml::tags( |
196 | 196 | 'li', |
— | — | @@ -206,7 +206,7 @@ |
207 | 207 | array( 'known', 'noclasses' ) |
208 | 208 | ) |
209 | 209 | ); |
210 | | - } else if( $ajaxHint || in_array( $namespace, $wgCollectionArticleNamespaces ) ) { |
| 210 | + } elseif( $ajaxHint || in_array( $namespace, $wgCollectionArticleNamespaces ) ) { |
211 | 211 | $params = array( 'arttitle' => $wgTitle->getPrefixedText() ); |
212 | 212 | if ( !is_null( $wgArticle ) ) { |
213 | 213 | $oldid = $wgArticle->getOldID(); |
Index: trunk/extensions/Collection/Collection.body.php |
— | — | @@ -179,7 +179,7 @@ |
180 | 180 | $title = Title::newFromText( |
181 | 181 | $userPageTitle . '/' . wfMsgForContent( 'coll-collections' ) . '/' . $collname |
182 | 182 | ); |
183 | | - } else if ( $colltype == 'community' ) { |
| 183 | + } elseif ( $colltype == 'community' ) { |
184 | 184 | $collname = $wgRequest->getVal( 'ccollname' ); |
185 | 185 | if ( !$wgUser->isAllowed( 'collectionsaveascommunitypage' ) || empty( $collname ) ) { |
186 | 186 | return; |
— | — | @@ -296,7 +296,7 @@ |
297 | 297 | usort( $articles, array( self, 'title_cmp' ) ); |
298 | 298 | $new_items = array_merge( $new_items, $articles, array( $item ) ); |
299 | 299 | $articles = array(); |
300 | | - } else if ( $item['type'] == 'article' ) { |
| 300 | + } elseif ( $item['type'] == 'article' ) { |
301 | 301 | $articles[] = $item; |
302 | 302 | } |
303 | 303 | } |
— | — | @@ -484,21 +484,21 @@ |
485 | 485 | $line = trim( $line ); |
486 | 486 | if ( !$append && preg_match( '/^===\s*(.*?)\s*===$/', $line, $match) ) { |
487 | 487 | $collection['subtitle'] = $match[ 1 ]; |
488 | | - } else if ( !$append && preg_match( '/^==\s*(.*?)\s*==$/', $line, $match) ) { |
| 488 | + } elseif ( !$append && preg_match( '/^==\s*(.*?)\s*==$/', $line, $match) ) { |
489 | 489 | $collection['title'] = $match[ 1 ]; |
490 | | - } else if (substr( $line, 0, 1 ) == ';') { // chapter |
| 490 | + } elseif (substr( $line, 0, 1 ) == ';') { // chapter |
491 | 491 | return array( |
492 | 492 | 'type' => 'chapter', |
493 | 493 | 'title' => trim( substr( $line, 1 ) ), |
494 | 494 | ); |
495 | | - } else if ( substr( $line, 0, 1 ) == ':' ) { // article |
| 495 | + } elseif ( substr( $line, 0, 1 ) == ':' ) { // article |
496 | 496 | $articleTitle = trim( substr( $line, 1 ) ); |
497 | 497 | if ( preg_match( '/\[\[:?(.*?)(\|(.*?))?\]\]/', $articleTitle, $match ) ) { |
498 | 498 | $articleTitle = $match[1]; |
499 | 499 | $displayTitle = $match[3]; |
500 | 500 | $oldid = -1; |
501 | 501 | $currentVersion = 1; |
502 | | - } else if ( preg_match( '/\[\{\{fullurl:(.*?)\|oldid=(.*?)\}\}\s+(.*?)\]/', $articleTitle, $match ) ) { |
| 502 | + } elseif ( preg_match( '/\[\{\{fullurl:(.*?)\|oldid=(.*?)\}\}\s+(.*?)\]/', $articleTitle, $match ) ) { |
503 | 503 | $articleTitle = $match[1]; |
504 | 504 | $displayTitle = $match[3]; |
505 | 505 | $oldid = $match[2]; |
— | — | @@ -593,7 +593,7 @@ |
594 | 594 | foreach ( $collection['items'] as $item ) { |
595 | 595 | if ( $item['type'] == 'chapter' ) { |
596 | 596 | $articleText .= ';' . $item['title'] . "\n"; |
597 | | - } else if ( $item['type'] == 'article' ) { |
| 597 | + } elseif ( $item['type'] == 'article' ) { |
598 | 598 | if ($item['currentVersion'] == 1) { |
599 | 599 | $articleText .= ":[[" . $item['title']; |
600 | 600 | if ( $item['displaytitle'] ) { |
— | — | @@ -690,7 +690,7 @@ |
691 | 691 | } else { |
692 | 692 | $currentChapter['items'][] = $item; |
693 | 693 | } |
694 | | - } else if ( $item['type'] == 'chapter' ) { |
| 694 | + } elseif ( $item['type'] == 'chapter' ) { |
695 | 695 | if ( !is_null( $currentChapter ) ) { |
696 | 696 | $items[] = $currentChapter; |
697 | 697 | } |
— | — | @@ -824,7 +824,7 @@ |
825 | 825 | $statusText = $response['status']['status']; |
826 | 826 | if ( isset( $response['status']['article'] ) && $response['status']['article'] ) { |
827 | 827 | $statusText .= ' ' . wfMsg( 'coll-rendering_article', $response['status']['article'] ); |
828 | | - } else if ( isset( $response['status']['page'] ) && $response['status']['page'] ) { |
| 828 | + } elseif ( isset( $response['status']['page'] ) && $response['status']['page'] ) { |
829 | 829 | $statusText .= ' ' . wfMsg( 'coll-rendering_page', $wgLang->formatNum( $response['status']['page'] ) ); |
830 | 830 | } |
831 | 831 | $status = wfMsg( 'coll-rendering_status', $statusText ); |
— | — | @@ -1046,7 +1046,7 @@ |
1047 | 1047 | $text = false; |
1048 | 1048 | $errorMessage = curl_error( $c ); |
1049 | 1049 | $headers = false; |
1050 | | - } else if ( curl_getinfo( $c, CURLINFO_HTTP_CODE ) != 200 ) { |
| 1050 | + } elseif ( curl_getinfo( $c, CURLINFO_HTTP_CODE ) != 200 ) { |
1051 | 1051 | $text = false; |
1052 | 1052 | $errorMessage = 'HTTP status ' . curl_getinfo( $c, CURLINFO_HTTP_CODE ); |
1053 | 1053 | $headers = false; |
Index: trunk/extensions/Collection/Collection.templates.php |
— | — | @@ -262,7 +262,7 @@ |
263 | 263 | } ?> |
264 | 264 | </span> |
265 | 265 | </li> |
266 | | - <?php } else if ($item['type'] == 'chapter') { ?> |
| 266 | + <?php } elseif ($item['type'] == 'chapter') { ?> |
267 | 267 | <li id="item-<?php echo intval( $index ) ?>" class="chapter" style="margin-top:0.3em;"> |
268 | 268 | <a onclick="return coll_remove_item(<?php echo intval( $index ) ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'remove_item/', 'index=' . $index)) ?>" title="<?php $this->msg('coll-remove') ?>"><img src="<?php echo htmlspecialchars($mediapath . "remove.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-remove') ?>" /></a> |
269 | 269 | <noscript> |