From c9e6869c681fa6579d1858cea45ec94eb0972f30 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 2 Dec 2009 19:08:13 -0800 Subject: Rename the "upload_limit" variable to "simultaneous_upload_limit" for clarity, since it only limits concurrency not the number of actual uploads. Move the default-setting code into the upgrader so that we avoid creating the variable as a side-effect of the view (personal preference to avoid side-effect code since it's led to problems in the past). --- modules/gallery/helpers/gallery_installer.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index 57a5ee9f..39859b36 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -432,6 +432,13 @@ class gallery_installer { module::clear_var("gallery", "blocks_site.sidebar"); module::set_version("gallery", $version = 19); } + + // Set a default for the number of simultaneous uploads + // Version 20 was reverted in 57adefc5baa7a2b0dfcd3e736e80c2fa86d3bfa2, so skip it. + if ($version == 19 || $version == 20) { + module::set_var("gallery", "simultaneous_upload_limit", 5); + module::set_version("gallery", $version = 21); + } } static function uninstall() { -- cgit v1.2.3