Index: trunk/extensions/SiteMatrix.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | # Not a valid entry point, skip unless MEDIAWIKI is defined |
7 | 7 | if (defined('MEDIAWIKI')) { |
8 | 8 | |
9 | | -$wgExtensionFunctions[] = "wfSiteMatrix"; |
| 9 | +$wgExtensionFunctions[] = 'wfSiteMatrix'; |
10 | 10 | $wgExtensionCredits['specialpage'][] = array( |
11 | 11 | 'name' => 'SiteMatrix', |
12 | 12 | 'description' => 'display a list of wikimedia wikis' |
— | — | @@ -13,12 +13,12 @@ |
14 | 14 | |
15 | 15 | function wfSiteMatrix() { |
16 | 16 | global $IP; |
17 | | -require_once( "$IP/includes/SpecialPage.php" ); |
| 17 | +require_once( $IP.'/includes/SpecialPage.php' ); |
18 | 18 | |
19 | | -class SiteMatrixPage extends SpecialPage |
20 | | -{ |
| 19 | +class SiteMatrixPage extends SpecialPage { |
| 20 | + |
21 | 21 | function SiteMatrixPage() { |
22 | | - SpecialPage::SpecialPage("SiteMatrix"); |
| 22 | + SpecialPage::SpecialPage('SiteMatrix'); |
23 | 23 | } |
24 | 24 | |
25 | 25 | function execute( $par ) { |
— | — | @@ -68,9 +68,9 @@ |
69 | 69 | # Construct the HTML |
70 | 70 | |
71 | 71 | # Header row |
72 | | - $s = "<table><tr>"; |
| 72 | + $s = '<table><tr>'; |
73 | 73 | foreach ( $names as $name ) { |
74 | | - $s .= "<td><strong>$name</strong></td>"; |
| 74 | + $s .= '<td><strong>' . $name . '</strong></td>'; |
75 | 75 | } |
76 | 76 | $s .= "</tr>\n"; |
77 | 77 | |
— | — | @@ -79,13 +79,13 @@ |
80 | 80 | $s .= "<tr>"; |
81 | 81 | $langhost = str_replace( '_', '-', $lang ); |
82 | 82 | foreach ( $names as $site => $name ) { |
83 | | - $url = "http://$langhost." . $hosts[$site] . "/"; |
| 83 | + $url = "http://$langhost." . $hosts[$site] . '/'; |
84 | 84 | if ( empty( $matrix[$site][$lang] ) ) { |
85 | 85 | # Non-existent wiki |
86 | | - $s .= "<td><a href=\"$url\" class=\"new\">$lang</a></td>"; |
| 86 | + $s .= '<td><a href="' . $url . '" class="new">' . $lang . '</a></td>'; |
87 | 87 | } else { |
88 | 88 | # Wiki exists |
89 | | - $s .= "<td><a href=\"$url\">$lang</a></td>"; |
| 89 | + $s .= '<td><a href="' . $url . '">' . $lang . '</a></td>'; |
90 | 90 | } |
91 | 91 | } |
92 | 92 | $s .= "</tr>\n"; |
— | — | @@ -93,19 +93,19 @@ |
94 | 94 | $s .= "</table>\n"; |
95 | 95 | |
96 | 96 | # Specials |
97 | | - $s .= "<ul>"; |
| 97 | + $s .= '<ul>'; |
98 | 98 | foreach ( $specials as $lang ) { |
99 | 99 | $langhost = str_replace( '_', '-', $lang ); |
100 | | - $s .= "<li><a href=\"http://$langhost.wikipedia.org/\">$lang</a></li>\n"; |
| 100 | + $s .= '<li><a href="http://' . $langhost . '.wikipedia.org/">' . $lang . "</a></li>\n"; |
101 | 101 | } |
102 | | - $s .= "</ul>"; |
| 102 | + $s .= '</ul>'; |
103 | 103 | $wgOut->addHTML( $s ); |
104 | 104 | } |
105 | 105 | } |
106 | 106 | |
107 | 107 | SpecialPage::addPage( new SiteMatrixPage ); |
108 | 108 | global $wgMessageCache; |
109 | | -$wgMessageCache->addMessage( "sitematrix", "List of Wikimedia wikis" ); |
| 109 | +$wgMessageCache->addMessage( 'sitematrix', 'List of Wikimedia wikis' ); |
110 | 110 | |
111 | 111 | } # End of extension function |
112 | 112 | } # End of invocation protection |