-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add default mailing list interests #6
Add default mailing list interests #6
Conversation
$this->app->db, | ||
sprintf( | ||
'select * from MailingListInterest | ||
where instance %s %s order by displayorder', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We typically align select
and where
statements
} | ||
$class_name = SwatDBClassMap::get( | ||
'DeliveranceMailingListInterestWrapper' | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DeliveranceMailingListInterestWrapper.php
needs to be required on the page. Currently this generates a fatal error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I needed it for testing, fixed in charleswaddell#1
DeliveranceSignupPage.php and DeliveranceMailChimpSignupPage.php both need their copyright years bumped as well. |
parent::init(); | ||
|
||
$this->row_wrapper_class = SwatDBClassMap::get( | ||
'DeliveranceMailingListInerest' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo, should be DeliveranceMailingListInterest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I needed it for testing, fixed in charleswaddell#1
Remember to run the following sql on all sites: alter table MailingListInterest add is_default boolean not null default false; |
The SQL has been run on all stage and live databases. |
$this->app->notifier->send( | ||
'newsletter_signup', | ||
array( | ||
'site' => $this->app->config->notifier->site, | ||
'list' => $list->getShortname(), | ||
'interests' => $this->getInterests(), | ||
'interests' => $interests, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should still use $this->getInterests()
in case subclasses customize the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not completely sure what to do about this one. The $this->getInterests()
has been removed since it now lives on the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps grab interests from the getSubscriberInfo()
method, or add back a getInterests()
method to do just that?
It's not the end of the world that it doesn't completely match the subscriber information, but it would be better if we set it up to.
This method was barely used, and gets an array of the full interest groupings from MailChimp.
…rests Renaming old getInterests() to getInterestGroupings().
|
||
public function getDefaultSubscriberInfo() | ||
{ | ||
$info = parent::getDefaultSubscriberInfo(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parent::getDefaultSubscriberInfo()
is abstract. Either make it return an empty array, or assign info to an empty array here.
Add default mailing list interests
No description provided.