Alexander Nicolaysen Sørnes : Emails especially for admins should be sent regardless of global emails setting

Alexander Nicolaysen Sørnes asornes at winehq.org
Tue Nov 17 17:35:46 CST 2009


Module: appdb
Branch: master
Commit: d3491d916c5378a1de136459065ed26d7a472c49
URL:    http://source.winehq.org/git/appdb.git/?a=commit;h=d3491d916c5378a1de136459065ed26d7a472c49

Author: Alexander Nicolaysen Sørnes <alexander at linux-xqqm.(none)>
Date:   Sun Nov 15 20:06:19 2009 +0100

Emails especially for admins should be sent regardless of global emails setting

---

 include/user.php |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/user.php b/include/user.php
index 36101af..a3b3426 100644
--- a/include/user.php
+++ b/include/user.php
@@ -580,9 +580,12 @@ class User {
 
                  // if we didn't find this entry in the $aUserId
                  // array then we should add it if the admin has
-                 // enabled global emails
+                 // enabled global emails.
+                 // If both appId and versionId are null we are especially
+                 // requesting to email admins, so the mail should be sent
+                 // regardless of global emails setting
                  $oAdmin = new user($oRow->userid);
-                 if($i === false && ($oAdmin->getPref('disable_global_emails','no') == 'no'))
+                 if($i === false && ($oAdmin->getPref('disable_global_emails','no') == 'no' && ($iAppId || $iVersionId)))
                      $aUserId[] = $oRow->userid;
              }
          }




More information about the wine-cvs mailing list