diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /extensions/InputBox/InputBox.php | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'extensions/InputBox/InputBox.php')
-rw-r--r-- | extensions/InputBox/InputBox.php | 71 |
1 files changed, 11 insertions, 60 deletions
diff --git a/extensions/InputBox/InputBox.php b/extensions/InputBox/InputBox.php index d5215efa..3f8b9eb4 100644 --- a/extensions/InputBox/InputBox.php +++ b/extensions/InputBox/InputBox.php @@ -1,62 +1,13 @@ <?php -/** - * InputBox extension - * - * @file - * @ingroup Extensions - * - * This file contains the main include file for the Inputbox extension of - * MediaWiki. - * - * Usage: Add the following line in LocalSettings.php: - * require_once( "$IP/extensions/InputBox/InputBox.php" ); - * - * @author Erik Moeller <moeller@scireview.de> - * namespaces search improvements partially by - * Leonardo Pimenta <leo.lns@gmail.com> - * Cleaned up by Trevor Parscal <tparscal@wikimedia.org> - * @copyright Public domain - * @license Public domain - * @version 0.1.4 - */ - -// Check environment -if ( !defined( 'MEDIAWIKI' ) ) { - echo "This is an extension to the MediaWiki package and cannot be run standalone.\n"; - die( -1 ); +if ( function_exists( 'wfLoadExtension' ) ) { + wfLoadExtension( 'InputBox' ); + // Keep i18n globals so mergeMessageFileList.php doesn't break + $wgMessagesDirs['InputBox'] = __DIR__ . '/i18n'; + /* wfWarn( + 'Deprecated PHP entry point used for InputBox extension. Please use wfLoadExtension instead, ' . + 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' + ); */ + return; +} else { + die( 'This version of the InputBox extension requires MediaWiki 1.25+' ); } - -/* Configuration */ - -// Credits -$wgExtensionCredits['parserhook'][] = array( - 'path' => __FILE__, - 'name' => 'InputBox', - 'author' => array( 'Erik Moeller', 'Leonardo Pimenta', 'Rob Church', 'Trevor Parscal', 'DaSch' ), - 'version' => '0.2.0', - 'url' => 'https://www.mediawiki.org/wiki/Extension:InputBox', - 'description' => 'Allow inclusion of predefined HTML forms.', - 'descriptionmsg' => 'inputbox-desc', -); - -// Shortcut to this extension directory -$dir = __DIR__ . '/'; - -// Internationalization -$wgMessagesDirs['InputBox'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['InputBox'] = $dir . 'InputBox.i18n.php'; - -// Register auto load for the special page class -$wgAutoloadClasses['InputBoxHooks'] = $dir . 'InputBox.hooks.php'; -$wgAutoloadClasses['InputBox'] = $dir . 'InputBox.classes.php'; - -// Register parser hook -$wgHooks['ParserFirstCallInit'][] = 'InputBoxHooks::register'; -$wgHooks['MediaWikiPerformAction'][] = 'InputBoxHooks::onMediaWikiPerformAction'; -$wgHooks['SpecialPageBeforeExecute'][] = 'InputBoxHooks::onSpecialPageBeforeExecute'; - -$wgResourceModules['ext.inputBox.styles'] = array( - 'localBasePath' => dirname( __FILE__ ) . '/resources', - 'remoteExtPath' => 'InputBox/resources', - 'styles' => 'ext.inputBox.styles.css', -); |