Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3778518
D1490.id3815.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D1490.id3815.diff
View Options
diff --git a/LocalSettings.php b/LocalSettings.php
--- a/LocalSettings.php
+++ b/LocalSettings.php
@@ -83,6 +83,8 @@
$wgFileCacheDirectory = $wgCacheDirectory . "/pages";
$wgUploadDirectory = $serviceConfiguration->getDataStoreDir() . "/images";
+CommonSettings::updateForeignFileRepos($wgForeignFileRepos);
+
# -------------------------------------------------------------
# Load extensions and skins
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/config/CommonSettings.php b/config/CommonSettings.php
--- a/config/CommonSettings.php
+++ b/config/CommonSettings.php
@@ -60,6 +60,23 @@
return $settings;
}
+ public static function updateForeignFileRepos (array &$repos) : void {
+ if ($GLOBALS['saasInstantCommons']) {
+ $repos[] = [
+ "class" => "ForeignAPIRepo",
+ "name" => "commonswiki",
+ "apibase" => "https://commons.wikimedia.org/w/api.php",
+ //"url" => "https://upload.wikimedia.org/wikipedia/commons",
+ //"thumbUrl" => "https://upload.wikimedia.org/wikipedia/commons/thumb",
+ "hashLevels" => 2,
+ "transformVia404" => true,
+ "fetchDescription" => true,
+ "descriptionCacheExpiry" => 172800, // 48 hours
+ "apiThumbCacheExpiry" => 1209600, // 14 days
+ ];
+ }
+ }
+
/**
* Replace default permissions by custom permissions.
*/
diff --git a/config/Settings.php b/config/Settings.php
--- a/config/Settings.php
+++ b/config/Settings.php
@@ -56,6 +56,7 @@
'wgUseInstantCommons' => [
'default' => true,
+ 'wolfplex' => false,
],
'wgLanguageCode' => [
@@ -110,6 +111,11 @@
'default' => true,
],
+ 'saasInstantCommons' => [
+ 'default' => false,
+ 'wolfplex' => true,
+ ],
+
'wgUsePathInfo' => [
// Per https://www.dereckson.be/blog/2013/10/24/mediawiki-nginx-configuration-file/
'default' => true,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 05:25 (20 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2263864
Default Alt Text
D1490.id3815.diff (2 KB)
Attached To
Mode
D1490: WIP: Tweak InstantCommons settings
Attached
Detach File
Event Timeline
Log In to Comment