2
0
Эх сурвалжийг харах

Update foreground.php

This will be used as a shim for mw 1.25 so if it detect 1.25 it will go straight to the json file if it detect mediawiki 1.24 or lower then it will use this file and ignore the json file.
paladox 9 жил өмнө
parent
commit
93abd3a941
1 өөрчлөгдсөн 9 нэмэгдсэн , 2 устгасан
  1. 9 2
      foreground.php

+ 9 - 2
foreground.php

@@ -9,8 +9,15 @@
  * @license 2-clause BSD
  */
 
-if( !defined( 'MEDIAWIKI' ) ) {
-   die( 'This is a skin to the MediaWiki package and cannot be run standalone.' );
+if ( function_exists( 'wfLoadSkin' ) ) {
+	wfLoadSkin( 'foreground' );
+	// Keep i18n globals so mergeMessageFileList.php doesn't break
+	$wgMessagesDirs['SkinForeground'] = __DIR__ . '/i18n';
+	/* wfWarn(
+		'Deprecated PHP entry point used for foreground skin. Please use wfLoadSkin instead, ' .
+		'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
+	); */
+	return;
 }
 
 $wgExtensionCredits['skin'][] = array(