Index: trunk/extensions/ApiSVGProxy/ApiSVGProxy.i18n.php |
— | — | @@ -0,0 +1,15 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation file for extension ApiSVGProxy. |
| 5 | + * |
| 6 | + * @addtogroup Extensions |
| 7 | +*/ |
| 8 | + |
| 9 | +$messages = array(); |
| 10 | + |
| 11 | +/** English |
| 12 | + * @author Roan Kattouw |
| 13 | + */ |
| 14 | +$messages['en'] = array( |
| 15 | + 'apisvgproxy-desc' => 'Proxies SVG files from a (possibly remote) file repository to the local domain', |
| 16 | +); |
Property changes on: trunk/extensions/ApiSVGProxy/ApiSVGProxy.i18n.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 17 | + native |
Name: svn:keywords |
2 | 18 | + Id |
Index: trunk/extensions/ApiSVGProxy/ApiSVGProxy.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License |
14 | 14 | */ |
15 | 15 | # Alert the user that this is not a valid entry point to MediaWiki if they try to access the extension file directly. |
16 | | -if( !defined( 'MEDIAWIKI' ) ) { |
| 16 | +if ( !defined( 'MEDIAWIKI' ) ) { |
17 | 17 | echo <<<EOT |
18 | 18 | To install the ApiSVGProxy extension, put the following line in LocalSettings.php: |
19 | 19 | require_once( "\$IP/extensions/ApiSVGProxy/ApiSVGProxy.php" ); |
— | — | @@ -27,10 +27,12 @@ |
28 | 28 | 'author' => 'Roan Kattouw', |
29 | 29 | 'url' => 'http://www.mediawiki.org/wiki/Extension:ApiSVGProxy', |
30 | 30 | 'version' => '1.0', |
31 | | - 'description' => 'Proxies SVG files from a (possibly remote) file repository to the local domain', |
| 31 | + 'descriptionmsg' => 'apisvgproxy-desc', |
32 | 32 | ); |
33 | 33 | |
34 | 34 | // Set up the new special page |
35 | 35 | $dir = dirname( __FILE__ ) . '/'; |
36 | 36 | $wgAutoloadClasses['ApiSVGProxy'] = $dir . 'ApiSVGProxy.body.php'; |
37 | | -$wgAPIModules['svgproxy'] = 'ApiSVGProxy'; |
\ No newline at end of file |
| 37 | +$wgAPIModules['svgproxy'] = 'ApiSVGProxy'; |
| 38 | + |
| 39 | +$wgExtensionMessagesFiles['ApiSVGProxy'] = dirname( __FILE__ ) . '/ApiSVGProxy.i18n.php'; |
Index: trunk/extensions/ApiSVGProxy/ApiSVGProxy.body.php |
— | — | @@ -11,8 +11,10 @@ |
12 | 12 | * @copyright Copyright © 2009 Roan Kattouw |
13 | 13 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License |
14 | 14 | */ |
15 | | -# Alert the user that this is not a valid entry point to MediaWiki if they try to access the extension file directly. |
16 | | -if( !defined( 'MEDIAWIKI' ) ) { |
| 15 | + |
| 16 | +# Alert the user that this is not a valid entry point to MediaWiki if they try |
| 17 | +# to access the extension file directly. |
| 18 | +if ( !defined( 'MEDIAWIKI' ) ) { |
17 | 19 | echo <<<EOT |
18 | 20 | To install the ApiSVGProxy extension, put the following line in LocalSettings.php: |
19 | 21 | require_once( "\$IP/extensions/ApiSVGProxy/ApiSVGProxy.php" ); |
— | — | @@ -31,20 +33,20 @@ |
32 | 34 | $file = wfFindFile( $title ); |
33 | 35 | |
34 | 36 | // Verify that the file exists and is an SVG file |
35 | | - if( !$file ) { |
36 | | - $this->dieUsage('The specified file does not exist', |
37 | | - 'nosuchfile', 404); |
| 37 | + if ( !$file ) { |
| 38 | + $this->dieUsage( 'The specified file does not exist', |
| 39 | + 'nosuchfile', 404 ); |
38 | 40 | } |
39 | | - if( $file->getExtension() != 'svg' || $file->getMimeType() != 'image/svg+xml' ) { |
40 | | - $this->dieUsage('The specified file is not an SVG file', |
41 | | - 'notsvg', 403); |
| 41 | + if ( $file->getExtension() != 'svg' || $file->getMimeType() != 'image/svg+xml' ) { |
| 42 | + $this->dieUsage( 'The specified file is not an SVG file', |
| 43 | + 'notsvg', 403 ); |
42 | 44 | } |
43 | 45 | |
44 | 46 | // Grab the file's contents |
45 | 47 | $contents = Http::get( $file->getFullUrl() ); |
46 | | - if( $contents === false ) { |
47 | | - $this->dieUsage('The specified file could not be fetched', |
48 | | - 'fetchfailed', 500); |
| 48 | + if ( $contents === false ) { |
| 49 | + $this->dieUsage( 'The specified file could not be fetched', |
| 50 | + 'fetchfailed', 500 ); |
49 | 51 | } |
50 | 52 | |
51 | 53 | // Output the file's contents raw |
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt |
— | — | @@ -37,6 +37,8 @@ |
38 | 38 | aliasfile = APC/ViewAPC.alias.php |
39 | 39 | descmsg = viewapc-desc |
40 | 40 | |
| 41 | +Api SVG Proxy |
| 42 | + |
41 | 43 | Asksql |
42 | 44 | aliasfile = Asksql/Asksql.alias.php |
43 | 45 | |