Index: trunk/extensions/Suhosin/Suhosin.i18n.php |
— | — | @@ -0,0 +1,20 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation file for extension Suhosin |
| 5 | + * @file |
| 6 | + * @ingroup Extensions |
| 7 | + * @author Thomas Gries |
| 8 | + */ |
| 9 | + |
| 10 | +$messages = array(); |
| 11 | + |
| 12 | +/** English |
| 13 | + * @author Thomas Gries |
| 14 | + */ |
| 15 | +$messages['en'] = array( |
| 16 | + 'suhosin-desc' => 'Adapts MediaWiki settings within limits of an activated "Suhosin" extension (Hardened-PHP Project).', |
| 17 | +); |
| 18 | + |
| 19 | +/** Message documentation (Message documentation) */ |
| 20 | +$messages['qqq'] = array( |
| 21 | +); |
Property changes on: trunk/extensions/Suhosin/Suhosin.i18n.php |
___________________________________________________________________ |
Added: svn:mime-type |
1 | 22 | + text/x-php |
Added: svn:keywords |
2 | 23 | + Author Date Id Rev URL |
Added: svn:eol-style |
3 | 24 | + native |
Index: trunk/extensions/Suhosin/Suhosin.php |
— | — | @@ -0,0 +1,62 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Suhosin extension |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + * |
| 9 | + * The extension adapts MediaWiki settings to corresponding settings |
| 10 | + * of php.ini for Hardened-PHP Project ("Suhosin extension") |
| 11 | + * |
| 12 | + * Installation: |
| 13 | + * |
| 14 | + * Add the following line in LocalSettings.php: |
| 15 | + * require_once( "$IP/extensions/Suhosin/Suhosin.php" ); |
| 16 | + * |
| 17 | + * This extension is based on: |
| 18 | + * https://www.mediawiki.org/wiki/Manual:Suhosin_(Hardened-PHP_Project_patch_and_extension) |
| 19 | + * |
| 20 | + * @author Thomas Gries |
| 21 | + * @license GPL v2 |
| 22 | + * @license MIT |
| 23 | + * |
| 24 | + * Dual licensed under the MIT and GPL licenses: |
| 25 | + * http://www.opensource.org/licenses/mit-license.php |
| 26 | + * http://www.gnu.org/licenses/gpl.html |
| 27 | + * |
| 28 | + */ |
| 29 | + |
| 30 | +# Check environment |
| 31 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 32 | + echo( "This is an extension to MediaWiki and cannot be run standalone.\n" ); |
| 33 | + die( - 1 ); |
| 34 | +} |
| 35 | + |
| 36 | +# Credits |
| 37 | +$wgExtensionCredits['parserhook'][] = array( |
| 38 | + 'path' => __FILE__, |
| 39 | + 'name' => 'Suhosin', |
| 40 | + 'author' => array( 'Thomas Gries' ), |
| 41 | + 'version' => '1.08 20120215', |
| 42 | + 'url' => 'https://www.mediawiki.org/wiki/Extension:Suhosin', |
| 43 | + 'descriptionmsg' => 'suhosin-desc', |
| 44 | +); |
| 45 | + |
| 46 | +$dir = dirname( __FILE__ ) . '/'; |
| 47 | +$wgExtensionMessagesFiles['Suhosin'] = $dir . 'Suhosin.i18n.php'; |
| 48 | + |
| 49 | +# Query string length limit for ResourceLoader. You should only set this if |
| 50 | +# your web server has a query string length limit (then set it to that limit), |
| 51 | +# or if you have suhosin.get.max_value_length set in php.ini (then set it to |
| 52 | +# that value) |
| 53 | +# Default in DefaultSettings.php: |
| 54 | +# $wgResourceLoaderMaxQueryLength = -1; |
| 55 | + |
| 56 | +if ( extension_loaded( "suhosin" ) |
| 57 | + && ini_get( "suhosin.get.max_name_length" ) |
| 58 | + && isset( $wgResourceLoaderMaxQueryLength ) |
| 59 | + && $wgResourceLoaderMaxQueryLength > 0 ) { |
| 60 | + |
| 61 | + // suhosin is active, thus do something meaningful with ini_get( "suhosin.get.max_name_length" ) |
| 62 | + $wgResourceLoaderMaxQueryLength = min( $wgResourceLoaderMaxQueryLength, ini_get( "suhosin.get.max_name_length" ) ); |
| 63 | +} |
Property changes on: trunk/extensions/Suhosin/Suhosin.php |
___________________________________________________________________ |
Added: svn:mime-type |
1 | 64 | + text/x-php |
Added: svn:keywords |
2 | 65 | + Author Date Id Rev URL |
Added: svn:eol-style |
3 | 66 | + native |