update_site false
end
- # Broken Extension - 3 April 2022 - Remove. See https://github.com/openstreetmap/chef/pull/491#issuecomment-1086759504
- mediawiki_extension "QuickInstantCommons" do
- site new_resource.site
- update_site false
- action :delete
+ if new_resource.commons
+ mediawiki_extension "QuickInstantCommons" do
+ site new_resource.site
+ update_site false
+ end
+ else
+ mediawiki_extension "QuickInstantCommons" do
+ site new_resource.site
+ update_site false
+ action :delete
+ end
end
cookbook_file "#{site_directory}/cc-wiki.png" do
$wgSVGConverter = 'rsvg';
$wgSVGMaxSize = 2000;
-<% if @mediawiki[:commons] -%>
-# Enable use of images from https://commons.wikimedia.org
-$wgForeignFileRepos[] = [
- 'class' => ForeignAPIRepo::class,
- 'name' => 'wikimediacommons',
- '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' => 604800,
- 'apiThumbCacheExpiry' => 604800,
-];
-<% end -%>
-
## If you use ImageMagick (or any other shell command) on a
## Linux server, this will need to be set to the name of an
## available UTF-8 locale