aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/application_controller.rb3
-rw-r--r--app/models/application_mailer.rb4
-rw-r--r--config/general-example6
3 files changed, 9 insertions, 4 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 516081d42..405327952 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -29,8 +29,7 @@ class ApplicationController < ActionController::Base
helper_method :site_name, :locale_from_params
def site_name
- # XXX should come from database:
- site_name = "InformataZyrtare.org"
+ site_name = MySociety::Config.get('SITE_NAME', 'Alaveteli')
return site_name
end
diff --git a/app/models/application_mailer.rb b/app/models/application_mailer.rb
index 623b97c5b..508ff2016 100644
--- a/app/models/application_mailer.rb
+++ b/app/models/application_mailer.rb
@@ -15,7 +15,9 @@ class ApplicationMailer < ActionMailer::Base
self.raise_delivery_errors = true
def contact_from_name_and_email
- "InformataZyrtare <"+MySociety::Config.get("CONTACT_EMAIL", 'contact@localhost')+">"
+ contact_name = MySociety::Config.get("CONTACT_NAME", 'contact@localhost')
+ contact_email = MySociety::Config.get("CONTACT_EMAIL", 'Alaveteli')
+ return "#{contact_name} <#{contact_email}>"
end
def blackhole_email
diff --git a/config/general-example b/config/general-example
index f9118acbd..ddc738906 100644
--- a/config/general-example
+++ b/config/general-example
@@ -29,6 +29,11 @@ define('OPTION_STAGING_SITE', 1);
// Domain used in URLs generated by scripts (e.g. for going in some emails)
define('OPTION_DOMAIN', '127.0.0.1:3000');
+// Domain used in URLs generated by scripts (e.g. for going in some emails)
+define('OPTION_SITE_NAME', 'Alaveteli');
+define('OPTION_CONTACT_EMAIL', 'postmaster@localhost');
+define('OPTION_CONTACT_NAME', 'Alaveteli Webmaster');
+
// Workflow settings
define('OPTION_REPLY_LATE_AFTER_DAYS', 20);
@@ -44,7 +49,6 @@ define('OPTION_BLACKHOLE_PREFIX', 'do-not-reply-to-this-address'); // used as en
define('OPTION_ADMIN_USERNAME', 'adminxxxx');
define('OPTION_ADMIN_PASSWORD', 'passwordx');
-define('OPTION_CONTACT_EMAIL', 'admin@localhost');
define('OPTION_ADMIN_BASE_URL', '/admin/');
// Where /stylesheets sits under for admin pages. See asset_host in