diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-09-01 23:19:43 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-09-01 23:19:43 -0700 |
commit | 04f6646b0637d9cb221159b4931b184449a4dc1d (patch) | |
tree | b81aac924c347b64103c547ac51db28de965470e /modules/gallery/helpers/gallery_installer.php | |
parent | 1f621d9827040d9730946a5804dd3d7269198ccc (diff) |
Hopefully the third and final patch for #1216. Set the default from and reply-to addresses to an empty string. The first time the user model is saved, set the sendmail from and reply-to addresses. Requires an update to gallery version 38.
Diffstat (limited to 'modules/gallery/helpers/gallery_installer.php')
-rw-r--r-- | modules/gallery/helpers/gallery_installer.php | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index d5264fcc..c6f19ad0 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -304,12 +304,12 @@ class gallery_installer { module::set_var("gallery", "favicon_url", "lib/images/favicon.ico"); // Sendmail configuration - module::set_var("gallery", "email_from", "admin@example.com"); - module::set_var("gallery", "email_reply_to", "public@example.com"); + module::set_var("gallery", "email_from", ""); + module::set_var("gallery", "email_reply_to", ""); module::set_var("gallery", "email_line_length", 70); module::set_var("gallery", "email_header_separator", serialize("\n")); - module::set_version("gallery", 37); + module::set_version("gallery", 38); } static function upgrade($version) { @@ -611,6 +611,20 @@ class gallery_installer { module::set_var("gallery", "email_header_separator", serialize("\n")); module::set_version("gallery", $version = 37); } + + // Changed our minds and decided that the initial value should be empty + // But don't just reset it blindly, only do it if the value is version 37 default + if ($version == 37) { + $email = module::get_var("gallery", "email_from", ""); + if ($email == "admin@example.com") { + module::set_var("gallery", "email_from", ""); + } + $email = module::get_var("gallery", "email_reply_to", ""); + if ($email == "admin@example.com") { + module::set_var("gallery", "email_reply_to", ""); + } + module::set_version("gallery", $version = 38); + } } static function uninstall() { |