Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/213956
Change subject: empty php entry point ...................................................................... empty php entry point Change-Id: If56898f56429e75683cdc2355b3e134e4d633386 --- M TemplateSandbox.php M i18n/pt-br.json A i18n/sa.json 3 files changed, 26 insertions(+), 49 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateSandbox refs/changes/56/213956/1 diff --git a/TemplateSandbox.php b/TemplateSandbox.php index f81e560..0245f73 100644 --- a/TemplateSandbox.php +++ b/TemplateSandbox.php @@ -20,52 +20,16 @@ * http://www.gnu.org/copyleft/gpl.html */ -# Alert the user that this is not a valid entry point to MediaWiki if they try -# to access the special pages file directly. -if ( !defined( 'MEDIAWIKI' ) ) { - echo <<<EOT -<p>This is the TemplateSandbox extension. To enable it, put the following line -in LocalSettings.php:</p> -<pre>require_once( "\$IP/extensions/TemplateSandbox/TemplateSandbox.php" );</pre> -EOT; - exit( 1 ); +if ( function_exists( 'wfLoadExtension' ) ) { + wfLoadExtension( 'TemplateSandbox' ); + // Keep i18n globals so mergeMessageFileList.php doesn't break + $wgMessagesDirs['TemplateSandbox'] = __DIR__ . '/i18n'; + $wgExtensionMessagesFiles['TemplateSandboxAlias'] = __DIR__ . '/TemplateSandbox.alias.php'; + /* wfWarn( + 'Deprecated PHP entry point used for TemplateSandbox extension. Please use wfLoadExtension instead, ' . + 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' + ); */ + return; +} else { + die( 'This version of the TemplateSandbox extension requires MediaWiki 1.25+' ); } - -/** - * Options: - * - * $wgTemplateSandboxEditNamespaces - * - Namespaces for which to add a "Preview page with this template" box - * to the edit form. - */ - -$wgTemplateSandboxEditNamespaces = array( - NS_TEMPLATE -); - -$wgExtensionCredits['specialpage'][] = array( - 'path' => __FILE__, - 'name' => 'TemplateSandbox', - 'author' => 'Brad Jorsch', - 'url' => 'https://www.mediawiki.org/wiki/Extension:TemplateSandbox', - 'descriptionmsg' => 'templatesandbox-desc', - 'version' => '1.1.0', - 'license-name' => 'GPL-2.0+', -); - -$wgAutoloadClasses['TemplateSandboxHooks'] = __DIR__ . '/TemplateSandbox.hooks.php'; -$wgAutoloadClasses['SpecialTemplateSandbox'] = __DIR__ . '/SpecialTemplateSandbox.php'; -$wgMessagesDirs['TemplateSandbox'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['TemplateSandbox'] = __DIR__ . '/TemplateSandbox.i18n.php'; -$wgExtensionMessagesFiles['TemplateSandboxAlias'] = __DIR__ . '/TemplateSandbox.alias.php'; -$wgSpecialPages['TemplateSandbox'] = 'SpecialTemplateSandbox'; -$wgHooks['EditPage::importFormData'][] = 'TemplateSandboxHooks::importFormData'; -$wgHooks['EditPage::showStandardInputs:options'][] = 'TemplateSandboxHooks::injectOptions'; -$wgHooks['AlternateEditPreview'][] = 'TemplateSandboxHooks::templateSandboxPreview'; - -$wgResourceModules['ext.TemplateSandbox'] = array( - 'scripts' => 'ext.TemplateSandbox.js', - 'position' => 'bottom', - 'localBasePath' => __DIR__ . '/modules', - 'remoteExtPath' => 'TemplateSandbox/modules' -); diff --git a/i18n/pt-br.json b/i18n/pt-br.json index 08facbc..86d577d 100644 --- a/i18n/pt-br.json +++ b/i18n/pt-br.json @@ -10,5 +10,8 @@ "templatesandbox-submit": "Ver", "templatesandbox-editform-legend": "Mostrar previsão da página com esta predefinição", "templatesandbox-editform-page-label": "Título da página:", - "templatesandbox-editform-view-label": "Prever" + "templatesandbox-editform-view-label": "Prever", + "templatesandbox-editform-invalid-template": "O nome do modelo que você especificou é inválido.", + "templatesandbox-editform-invalid-title": "O título que você especificou para a pré-visualização é inválido.", + "templatesandbox-editform-title-not-exists": "O título que você especificou para a pré-visualização não existe." } diff --git a/i18n/sa.json b/i18n/sa.json new file mode 100644 index 0000000..b518508 --- /dev/null +++ b/i18n/sa.json @@ -0,0 +1,10 @@ +{ + "@metadata": { + "authors": [ + "NehalDaveND" + ] + }, + "templatesandbox-suffix": "प्रयोगपृष्ठम्", + "templatesandbox-legend": "फलकस्य प्रयोगपृष्ठम्", + "templatesandbox-submit": "दृश्यताम्" +} -- To view, visit https://gerrit.wikimedia.org/r/213956 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If56898f56429e75683cdc2355b3e134e4d633386 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TemplateSandbox Gerrit-Branch: master Gerrit-Owner: Paladox <[email protected]> Gerrit-Reviewer: L10n-bot <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
