Index: trunk/extensions/ApiExplorer/SpecialApiExplorer.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | * handle all functions. |
14 | 14 | */ |
15 | 15 | |
16 | | -if (!defined('MEDIAWIKI')) die(); |
| 16 | +if ( !defined( 'MEDIAWIKI' ) ) die(); |
17 | 17 | |
18 | 18 | $wgExtensionFunctions[] = 'wfSpecialApiExplorer'; |
19 | 19 | $wgExtensionCredits['specialpage'][] = array( |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | 'author' => '[http://seancolombo.com Sean Colombo]' |
25 | 25 | ); |
26 | 26 | |
27 | | -$dir = dirname(__FILE__) . '/'; |
| 27 | +$dir = dirname( __FILE__ ) . '/'; |
28 | 28 | $wgExtensionMessagesFiles['ApiExplorer'] = $dir . 'ApiExplorer.i18n.php'; |
29 | 29 | |
30 | 30 | function wfSpecialApiExplorer () { |
— | — | @@ -52,7 +52,7 @@ |
53 | 53 | |
54 | 54 | // TODO: Make this work for ResourceLoader (Wikia isn't using RL yet at the time of this writing). |
55 | 55 | // Wikia has the cachebuster in the wgExtensionPath (we rewrite that in varnish because many proxies won't cache things that have "?" in the URL), but other MediaWikis need the style-version in the querystring. |
56 | | - $cbSuffix = ( isset($wgCityId) ? "?{$wgStyleVersion}" : "" ); |
| 56 | + $cbSuffix = ( isset( $wgCityId ) ? "?{$wgStyleVersion}" : "" ); |
57 | 57 | $wgOut->addScript( "<script type=\"text/javascript\" src=\"{$wgExtensionsPath}/wikia/JavascriptAPI/Mediawiki.js{$cbSuffix}\"></script>" ); |
58 | 58 | $wgOut->addScript( "<script type=\"text/javascript\" src=\"{$wgExtensionsPath}/ApiExplorer/apiExplorer.js{$cbSuffix}\"></script>" ); |
59 | 59 | $wgOut->addScript( "<link rel=\"stylesheet\" type=\"text/css\" href=\"{$wgExtensionsPath}/ApiExplorer/apiExplorer.css{$cbSuffix}\" />" ); |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | ob_start(); |
62 | 62 | $buttonHeight = 15; |
63 | 63 | $collapseSrc = "$wgExtensionsPath/ApiExplorer/collapse.png$cbSuffix"; |
64 | | - $expandSrc = "$wgExtensionsPath/ApiExplorer/collapse.png$cbSuffix"; |
| 64 | + $expandSrc = "$wgExtensionsPath/ApiExplorer/collapse.png$cbSuffix"; |
65 | 65 | ?><style> |
66 | 66 | .collapsible h2 span, .collapsible h3 span{ |
67 | 67 | width:<?= $buttonHeight ?>px; |
— | — | @@ -82,8 +82,8 @@ |
83 | 83 | <div id='apEx_loading'><?= wfMsg('apiexplorer-loading') ?></div> |
84 | 84 | <div id='apEx'> |
85 | 85 | <?php |
86 | | - $params = array("modules", "querymodules", "formatmodules"); |
87 | | - foreach($params as $param){ |
| 86 | + $params = array( "modules", "querymodules", "formatmodules" ); |
| 87 | + foreach ( $params as $param ) { |
88 | 88 | ?><div class='<?= $param ?> collapsible collapsed paramName' data-param-name='<?= $param ?>'> |
89 | 89 | <h2 class='name'><span class='toggleIcon'></span></h2> |
90 | 90 | <div class='paramContent'> |
Index: trunk/extensions/ApiExplorer/apiExplorer.css |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | -webkit-border-radius: 10px; |
50 | 50 | -moz-border-radius: 10px; |
51 | 51 | border-radius: 10px; |
52 | | - |
| 52 | + |
53 | 53 | /* Not collapsed... so hide the bottom border so it bleeds into the rest */ |
54 | 54 | border-bottom:0px; |
55 | 55 | border-bottom-left-radius:0px; |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | background-image: -o-linear-gradient(top, #2C85D6 0%, #00396D 100%); |
70 | 70 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #2C85D6), color-stop(1, #00396D)); |
71 | 71 | background-image: -webkit-linear-gradient(top, #2C85D6 0%, #00396D 100%); |
72 | | - background-image: linear-gradient(top, #2C85D6 0%, #00396D 100%); |
| 72 | + background-image: linear-gradient(top, #2C85D6 0%, #00396D 100%); |
73 | 73 | |
74 | 74 | color:white; |
75 | 75 | } |
Index: trunk/extensions/ApiExplorer/apiExplorer.js |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | */ |
19 | 19 | this.run = function(){ |
20 | 20 | $().log("Starting API Explorer..."); |
21 | | - |
| 21 | + |
22 | 22 | // Show the loading indicator until the API request has returned & the new page-content is set-up. |
23 | 23 | $('#apEx_loading').show(); |
24 | 24 | |
— | — | @@ -99,7 +99,7 @@ |
100 | 100 | $().log(err); |
101 | 101 | }); |
102 | 102 | }; |
103 | | - |
| 103 | + |
104 | 104 | /** |
105 | 105 | * Converts a JS object to HTML (mostly nested lists), but tweaked for the specific use-case of |
106 | 106 | * the API Explorer's results from the API... so it will make the result more readable, but this function |
Index: trunk/extensions/ApiExplorer/ApiExplorer.i18n.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | 'apiexplorer' => 'API Explorer', |
16 | 16 | 'apiexplorer-desc' => 'Page for interactively exploring the documentation of the live version of the MediaWiki API running on this installation.', |
17 | 17 | 'apiexplorer-intro' => "This page shows documentation for the current wiki's API. Please click on a function below to see more info about what parameters can be used in each call. For the general MediaWiki API documentation, see $1", |
18 | | - |
| 18 | + |
19 | 19 | 'apiexplorer-loading' => 'Loading functions...', |
20 | 20 | ); |
21 | 21 | |