Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
38d93cb0
Commit
38d93cb0
authored
Jan 30, 2011
by
Petr Skoda
Browse files
MDL-26046 prevent jabber messages wehn noemailever active
Standardise also the debug when emailing message.
parent
8cdc85ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
config-dist.php
View file @
38d93cb0
...
...
@@ -379,7 +379,8 @@ $CFG->admin = 'admin';
// Prevent core_string_manager on-disk cache
// $CFG->langstringcache = false; // NOT FOR PRODUCTION SERVERS!
//
// When working with production data on test servers, no emails should ever be send to real users
// When working with production data on test servers, no emails or other messages
// should ever be send to real users
// $CFG->noemailever = true; // NOT FOR PRODUCTION SERVERS!
//
// Divert all outgoing emails to this address to test and debug emailing features
...
...
message/output/email/message_output_email.php
View file @
38d93cb0
...
...
@@ -38,7 +38,13 @@ class message_output_email extends message_output {
* @param object $eventdata the event data submitted by the message sender plus $eventdata->savedmessageid
*/
function
send_message
(
$eventdata
)
{
global
$SITE
;
global
$CFG
;
if
(
!
empty
(
$CFG
->
noemailever
))
{
// hidden setting for development sites, set in config.php if needed
debugging
(
'$CFG->noemailever active, no email message sent.'
,
DEBUG_MINIMAL
);
return
true
;
}
//hold onto email preference because /admin/cron.php sends a lot of messages at once
static
$useremailaddresses
=
array
();
...
...
message/output/jabber/message_output_jabber.php
View file @
38d93cb0
...
...
@@ -45,6 +45,12 @@ class message_output_jabber extends message_output {
global
$CFG
;
if
(
message_output_jabber
::
_jabber_configured
())
{
if
(
!
empty
(
$CFG
->
noemailever
))
{
// hidden setting for development sites, set in config.php if needed
debugging
(
'$CFG->noemailever active, no jabber message sent.'
,
DEBUG_MINIMAL
);
return
true
;
}
//hold onto jabber id preference because /admin/cron.php sends a lot of messages at once
static
$jabberaddresses
=
array
();
...
...
@@ -86,7 +92,7 @@ class message_output_jabber extends message_output {
*/
function
config_form
(
$preferences
){
global
$CFG
;
if
(
!
message_output_jabber
::
_jabber_configured
())
{
return
get_string
(
'notconfigured'
,
'message_jabber'
);
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment