Skip to content

Commit

Permalink
This commit really helps improve the speed of any action that involve…
Browse files Browse the repository at this point in the history
…s sending

email.  It can be improved more and I've been inspired to clean up the email_api
a little more while I'm in here.  Stay tuned for more in the next day or so but
it's 4am now so sleep is in order!

* config_defaults_inc.php
  (g_email_receive_own): new config option to control whether users get emails
    about their own actions

* core/email_api.php
  (get_notify_flag): renamed to email_notify_flag()
  (email_collect_recipients): new function to collect the list of users that
    should receive emails but without executing several thousand queries and
    a much cleaner rewrite
  (build_bcc_list):
    + strip down most of it and call the above function
    + use config_get()
  (email_build_bug_message):
    + use config_get()
    + call bug_get_extended_row() instead of executing a query
    + call project_get_field() instead of executing a query
  (get_bug_summary): remove in favour of bug_get_field()


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1987 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Julian Fitzell committed Feb 22, 2003
1 parent 794460a commit beaff28
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 200 deletions.
8 changes: 6 additions & 2 deletions config_defaults_inc.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: config_defaults_inc.php,v 1.89 2003-02-21 00:32:38 vboctor Exp $
# $Id: config_defaults_inc.php,v 1.90 2003-02-22 12:02:00 jfitzell Exp $
# --------------------------------------------------------


Expand Down Expand Up @@ -137,14 +137,18 @@
'monitor' => ON,
'admin' => ON,
'bugnotes' => ON,
'threshold' => NOBODY);
'threshold_min' => NOBODY,
'threshold_max' => NOBODY);

# Following is the definition of the differences between the "new" action and the default.
# In case you need to override the threshold for the new action in custom_config_inc.php, use:
# $g_notify_flags['new']['threshold'] = MANAGER;
$g_notify_flags['new'] = array('bugnotes' => OFF,
'monitor' => OFF);

# Whether user's should receive emails for their own actions
$g_email_receive_own = OFF;

# set to OFF to disable email check
$g_validate_email = ON;
$g_check_mx_record = ON;
Expand Down

0 comments on commit beaff28

Please sign in to comment.