Purodha has uploaded a new change for review. https://gerrit.wikimedia.org/r/254430
Change subject: Make maintenance/convertExtensionToRegistration.php run. ...................................................................... Make maintenance/convertExtensionToRegistration.php run. Change-Id: I79b7556d59f667d0c52c9c62c444b6666415face --- M App.php M OmegaWiki/WikiDataGlobals.php 2 files changed, 15 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLexicalData refs/changes/30/254430/1 diff --git a/App.php b/App.php index 05b9a4e..4b03c2e 100644 --- a/App.php +++ b/App.php @@ -9,20 +9,23 @@ */ if ( !defined( 'MEDIAWIKI' ) ) die( 'Invalid entry point.' ); - -if ( !isset( $wgDBprefix ) ) { global $wgDBprefix; $wgDBprefix = null; } +global $wgWldScriptPath, $wgWldOwScriptPath, $wgWldDownloadScriptPath, $wgWldIncludesScriptPath, $wgWldSpecialsScriptPath, $wgWldAPIScriptPath, $wgWldSetupScriptPath, $wgWldJobsScriptPath, $wgWldDbScripts ; $dir = dirname( __FILE__ ) . '/'; - $dir = str_replace( '\\', '/', $dir ); - +if ( !isset( $wgDBprefix ) ) { + global $wgDBprefix; + $wgDBprefix = null; +} +if ( ! isset ( $wdHandlerPath ) ) { + $wdHandlerPath = $dir . '/OmegaWiki/' ; +} require_once( $dir . 'OmegaWiki/WikiDataGlobals.php' ); require_once( $dir . 'OmegaWiki/Wikidata.php' ); - -require_once( $wgWldScriptPath . 'SpecialLanguages.php' ); +require_once( $wgWldScriptPath . '/SpecialLanguages.php' ); // API -require_once( $wgWldAPIScriptPath . 'OmegaWikiExt.php' ); +require_once( $wgWldAPIScriptPath . '/OmegaWikiExt.php' ); $wgExtensionCredits['other'][] = array( 'path' => __FILE__, @@ -41,13 +44,12 @@ 'descriptionmsg' => 'wikidata-desc', ); -$wgMessagesDirs['LexicalData'] = __DIR__ . '/i18n/lexicaldata'; +$wgMessagesDirs['LexicalData'] = $dir . '/i18n/lexicaldata'; $wgExtensionMessagesFiles['LexicalData'] = $dir . 'Wikidata.i18n.php'; // Resource modules - $resourcePathArray = array( - 'localBasePath' => dirname( __FILE__ ) . '/resources', + 'localBasePath' => $dir . '/resources', 'remoteExtPath' => 'WikiLexicalData/resources' ); @@ -156,9 +158,7 @@ # in a single database. if ( !isset( $wdSiteContext ) ) $wdSiteContext = "uw"; -# -## Hooks -# +// Hooks $wgHooks['BeforePageDisplay'][] = 'WikiLexicalDataHooks::onBeforePageDisplay'; $wgHooks['GetPreferences'][] = 'WikiLexicalDataHooks::onGetPreferences'; $wgHooks['ArticleFromTitle'][] = 'WikiLexicalDataHooks::onArticleFromTitle'; @@ -190,3 +190,4 @@ // Tags require_once( $wgWldSetupScriptPath . "OWTags.php" ); + diff --git a/OmegaWiki/WikiDataGlobals.php b/OmegaWiki/WikiDataGlobals.php index fae1c78..ca04fad 100644 --- a/OmegaWiki/WikiDataGlobals.php +++ b/OmegaWiki/WikiDataGlobals.php @@ -45,13 +45,13 @@ $wgIso639_3CollectionId = null; // paths +global $wgWldScriptPath, $wgWldOwScriptPath, $wgWldDownloadScriptPath, $wgWldIncludesScriptPath, $wgWldSpecialsScriptPath, $wgWldAPIScriptPath, $wgWldSetupScriptPath, $wgWldJobsScriptPath, $wgWldDbScripts ; $wgWldScriptPath = __DIR__ . '/'; $wgWldScriptPath = str_replace( '\\', '/', $wgWldScriptPath ); $wgWldScriptPath = str_replace( 'OmegaWiki/', '', $wgWldScriptPath ); if ( !isset( $IP ) ) { $IP = $wgWldScriptPath . '../../'; } - $wgWldOwScriptPath = $wgWldScriptPath . "OmegaWiki/"; $wgWldDownloadScriptPath = $IP . "/downloads/"; $wgWldDownloadScriptPath = str_replace( '//', '/', $wgWldDownloadScriptPath ); -- To view, visit https://gerrit.wikimedia.org/r/254430 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79b7556d59f667d0c52c9c62c444b6666415face Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiLexicalData Gerrit-Branch: master Gerrit-Owner: Purodha <puro...@blissenbach.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits