MDL-27171 messages: implement new syntax in messages.php and update processing

The new messaging default settings can be set in messages.php and deployed
during installation. This also ensures the removing of settings on plugin
uninstallation and contains the update script to populate current default
settings on the existing system when the new feature is introduced.

For security reason we have to avoid using library functions in upgrade
function, so we set defaults the blind way. At this point we do not expect
plugins to have individual messaging defaults presets anyway. The site
defaults are the same as were set for each user using
message_set_default_message_preferences function.

Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
This commit is contained in:
Ruslan Kabalin 2011-05-20 15:10:27 +01:00
parent 3bcbd80ebe
commit 7a04c476a2
11 changed files with 201 additions and 60 deletions

View file

@ -37,7 +37,6 @@ $string['blockcontact'] = 'Block contact';
$string['blockedmessages'] = '{$a} message(s) to/from blocked users';
$string['blockedusers'] = 'Blocked users ({$a})';
$string['blocknoncontacts'] = 'Prevent non-contacts from messaging me';
$string['cannotsavemessageprefs'] = 'Could not save user messaging preferences';
$string['contactlistempty'] = 'Your contact list is empty';
$string['contacts'] = 'Contacts';
$string['context'] = 'context';
@ -53,6 +52,7 @@ $string['emailmessages'] = 'Email messages when I am offline';
$string['emailtagline'] = 'This is a copy of a message sent to you at "{$a->sitename}". Go to {$a->url} to reply.';
$string['emptysearchstring'] = 'You must search for something';
$string['errorcallingprocessor'] = 'Error calling defined processor';
$string['errortranslatingdefault'] = 'Error translating default setting provided by plugin, using system defaults instead.';
$string['forced'] = 'Forced';
$string['formorethan'] = 'For more than';
$string['guestnoeditmessage'] = 'Guest user can not edit messaging options';