Merge branch '0.9.x' into emailsummary
This commit is contained in:
commit
41a0f18301
14
EVENTS.txt
14
EVENTS.txt
|
@ -302,6 +302,20 @@ StartProfileSaveForm: before starting to save a profile settings form
|
|||
EndProfileSaveForm: after saving a profile settings form (after commit, no profile or user object!)
|
||||
- $action: action object being shown
|
||||
|
||||
StartEmailFormData: just before showing text entry fields on email settings page
|
||||
- $action: action object being shown
|
||||
|
||||
EndEmailFormData: just after showing text entry fields on email settings page
|
||||
- $action: action object being shown
|
||||
|
||||
StartEmailSaveForm: before starting to save a email settings form
|
||||
- $action: action object being shown
|
||||
- &$user: user being saved
|
||||
|
||||
EndEmailSaveForm: after saving a email settings form (after commit)
|
||||
- $action: action object being shown
|
||||
- &$user: user being saved
|
||||
|
||||
StartRegistrationFormData: just before showing text entry fields on registration page
|
||||
- $action: action object being shown
|
||||
|
||||
|
|
|
@ -178,6 +178,8 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
$this->element('legend', null, _('Email preferences'));
|
||||
|
||||
$this->elementStart('ul', 'form_data');
|
||||
|
||||
if (Event::handle('StartEmailFormData', array($this))) {
|
||||
$this->elementStart('li');
|
||||
$this->checkbox('emailnotifysub',
|
||||
// TRANS: Checkbox label in e-mail preferences form.
|
||||
|
@ -223,6 +225,8 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
_('Publish a MicroID for my email address.'),
|
||||
$user->emailmicroid);
|
||||
$this->elementEnd('li');
|
||||
Event::handle('EndEmailFormData', array($this));
|
||||
}
|
||||
$this->elementEnd('ul');
|
||||
// TRANS: Button label to save e-mail preferences.
|
||||
$this->submit('save', _m('BUTTON','Save'));
|
||||
|
@ -299,6 +303,10 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
|
||||
function savePreferences()
|
||||
{
|
||||
$user = common_current_user();
|
||||
|
||||
if (Event::handle('StartEmailSaveForm', array($this, &$user))) {
|
||||
|
||||
$emailnotifysub = $this->boolean('emailnotifysub');
|
||||
$emailnotifyfav = $this->boolean('emailnotifyfav');
|
||||
$emailnotifymsg = $this->boolean('emailnotifymsg');
|
||||
|
@ -307,8 +315,6 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
$emailmicroid = $this->boolean('emailmicroid');
|
||||
$emailpost = $this->boolean('emailpost');
|
||||
|
||||
$user = common_current_user();
|
||||
|
||||
assert(!is_null($user)); // should already be checked
|
||||
|
||||
$user->query('BEGIN');
|
||||
|
@ -334,9 +340,12 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
|
||||
$user->query('COMMIT');
|
||||
|
||||
Event::handle('EndEmailSaveForm', array($this));
|
||||
|
||||
// TRANS: Confirmation message for successful e-mail preferences save.
|
||||
$this->showForm(_('Email preferences saved.'), true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the address passed in by the user
|
||||
|
|
|
@ -107,3 +107,15 @@ create table group_alias (
|
|||
index group_alias_group_id_idx (group_id)
|
||||
|
||||
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
|
||||
|
||||
create table session (
|
||||
|
||||
id varchar(32) primary key comment 'session ID',
|
||||
session_data text comment 'session data',
|
||||
created datetime not null comment 'date this record was created',
|
||||
modified timestamp comment 'date this record was modified',
|
||||
|
||||
index session_modified_idx (modified)
|
||||
|
||||
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user