Sisyphus repositório
Última atualização: 18 agosto 2019 | SRPMs: 17338 | Visitas: 14652702
en ru br
ALT Linux repositórios
S:1.32.2-alt1
D:1.13.0-alt1
5.0: 1.13.0-alt3
4.1: 1.13.0-alt2.M41.2
4.0: 1.13.0-alt2.M40.1
+backports:1.13.0-alt2.M40.1

Group :: Rede/WWW
RPM: mediawiki

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: mediawiki-1.32-config-path.patch
Download


diff --git a/mediawiki/includes/DefaultSettings.php b/mediawiki/includes/DefaultSettings.php
index 97e27b7..98b24d2 100644
--- a/mediawiki/includes/DefaultSettings.php
+++ b/mediawiki/includes/DefaultSettings.php
@@ -2628,7 +2628,7 @@ $wgInvalidateCacheOnLocalSettingsChange = true;
  *
  * @par Example:
  * @code
- * $wgExtensionInfoMtime = filemtime( "$IP/LocalSettings.php" );
+ * $wgExtensionInfoMtime = filemtime( "$IP/config/LocalSettings.php" );
  * @endcode
  *
  * If set to false, the mtime for each individual JSON file will be checked,
diff --git a/mediawiki/includes/Setup.php b/mediawiki/includes/Setup.php
index f402594..1cf6fbb 100644
--- a/mediawiki/includes/Setup.php
+++ b/mediawiki/includes/Setup.php
@@ -89,9 +89,18 @@ if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
 	call_user_func( MW_CONFIG_CALLBACK );
 } else {
 	if ( !defined( 'MW_CONFIG_FILE' ) ) {
-		define( 'MW_CONFIG_FILE', "$IP/LocalSettings.php" );
+		define( 'MW_CONFIG_FILE', "$IP/local/LocalSettings.php" );
 	}
 	require_once MW_CONFIG_FILE;
+	
+	### ALT specific loading configs from packages
+	# Include all PHP files in config/LocalSettings.d/ directory
+	if (is_dir("$IP/config/LocalSettings.d")) {
+		foreach (glob("$IP/config/LocalSettings.d/*.php") as $d_config) {
+			require_once($d_config);
+		}
+	}
+	###
 }
 
 /**
@@ -528,7 +537,7 @@ $wgFileExtensions = array_values( array_diff( $wgFileExtensions, $wgFileBlacklis
 
 if ( $wgInvalidateCacheOnLocalSettingsChange ) {
 	Wikimedia\suppressWarnings();
-	$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', filemtime( "$IP/LocalSettings.php" ) ) );
+	$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', filemtime( "$IP/config/LocalSettings.php" ) ) );
 	Wikimedia\restoreWarnings();
 }
 
diff --git a/mediawiki/includes/WebStart.php b/mediawiki/includes/WebStart.php
index 6f3aa71..97d848b 100644
--- a/mediawiki/includes/WebStart.php
+++ b/mediawiki/includes/WebStart.php
@@ -58,7 +58,7 @@ if ( $IP === false ) {
 // (use a callback because it depends on TemplateParser)
 if ( !defined( 'MW_CONFIG_CALLBACK' ) ) {
 	if ( !defined( 'MW_CONFIG_FILE' ) ) {
-		define( 'MW_CONFIG_FILE', "$IP/LocalSettings.php" );
+		define( 'MW_CONFIG_FILE', "$IP/config/LocalSettings.php" );
 	}
 	if ( !is_readable( MW_CONFIG_FILE ) ) {
 		function wfWebStartNoLocalSettings() {
diff --git a/mediawiki/includes/installer/Installer.php b/mediawiki/includes/installer/Installer.php
index abf4de4..4360145 100644
--- a/mediawiki/includes/installer/Installer.php
+++ b/mediawiki/includes/installer/Installer.php
@@ -607,7 +607,7 @@ abstract class Installer {
 		global $wgExtensionDirectory, $wgStyleDirectory;
 
 		Wikimedia\suppressWarnings();
-		$_lsExists = file_exists( "$IP/LocalSettings.php" );
+		$_lsExists = file_exists( "$IP/config/LocalSettings.php" );
 		Wikimedia\restoreWarnings();
 
 		if ( !$_lsExists ) {
@@ -616,7 +616,7 @@ abstract class Installer {
 		unset( $_lsExists );
 
 		require "$IP/includes/DefaultSettings.php";
-		require "$IP/LocalSettings.php";
+		require "$IP/config/LocalSettings.php";
 
 		return get_defined_vars();
 	}
diff --git a/mediawiki/maintenance/Maintenance.php b/mediawiki/maintenance/Maintenance.php
index 13fee9c..611f0bc 100644
--- a/mediawiki/maintenance/Maintenance.php
+++ b/mediawiki/maintenance/Maintenance.php
@@ -1206,7 +1206,7 @@ abstract class Maintenance {
 		} elseif ( defined( "MW_CONFIG_FILE" ) ) {
 			$settingsFile = MW_CONFIG_FILE;
 		} else {
-			$settingsFile = "$IP/LocalSettings.php";
+			$settingsFile = "$IP/config/LocalSettings.php";
 		}
 		if ( isset( $this->mOptions['wiki'] ) ) {
 			$bits = explode( '-', $this->mOptions['wiki'] );
diff --git a/mediawiki/maintenance/hhvm/makeRepo.php b/mediawiki/maintenance/hhvm/makeRepo.php
index cef0dad..bde2982 100644
--- a/mediawiki/maintenance/hhvm/makeRepo.php
+++ b/mediawiki/maintenance/hhvm/makeRepo.php
@@ -62,7 +62,7 @@ class HHVMMakeRepo extends Maintenance {
 			$baseDir .= '/';
 		}
 
-		$unfilteredFiles = [ "$IP/LocalSettings.php" ];
+		$unfilteredFiles = [ "$IP/config/LocalSettings.php" ];
 		foreach ( $dirs as $dir ) {
 			$this->appendDir( $unfilteredFiles, $dir );
 		}
diff --git a/mediawiki/tests/integration/includes/shell/FirejailCommandTest.php b/mediawiki/tests/integration/includes/shell/FirejailCommandTest.php
index 1e008ee..f95ea94 100644
--- a/mediawiki/tests/integration/includes/shell/FirejailCommandTest.php
+++ b/mediawiki/tests/integration/includes/shell/FirejailCommandTest.php
@@ -71,7 +71,7 @@ class FirejailCommandIntegrationTest extends PHPUnit\Framework\TestCase {
 			[ 'ls /dev/cpu', Shell::PRIVATE_DEV ],
 			[ 'curl -fsSo /dev/null https://wikipedia.org/', Shell::NO_NETWORK ],
 			[ 'exec ls /', Shell::NO_EXECVE ],
-			[ "cat $IP/LocalSettings.php", Shell::NO_LOCALSETTINGS ],
+			[ "cat $IP/config/LocalSettings.php", Shell::NO_LOCALSETTINGS ],
 		];
 	}
 
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009