mirror of https://github.com/BOINC/boinc.git
Don't send reply-notifications to the user who posted the reply.
svn path=/trunk/boinc/; revision=6169
This commit is contained in:
parent
db77523307
commit
f0cbe53a2a
|
@ -6646,3 +6646,15 @@ David 15 May 2005
|
|||
client/
|
||||
cs_scheduler.C
|
||||
scheduler_op.C,h
|
||||
|
||||
Janus 16 May 2005
|
||||
- Don't send reply-notifications in the forum to the user who posted the
|
||||
reply, this just adds needless datatransfer for sending the mail and
|
||||
later because the user will check if there actually was a reply...
|
||||
|
||||
html/
|
||||
inc/
|
||||
subsribe.inc
|
||||
user/
|
||||
forum_reply.php
|
||||
|
||||
|
|
|
@ -67,8 +67,17 @@ function show_result_page($action, $success, $thread) {
|
|||
|
||||
}
|
||||
|
||||
function notify_subscribers($threadID) {
|
||||
$sql = "SELECT DISTINCT * FROM subscriptions WHERE threadid = " . $threadID;
|
||||
/**
|
||||
* Notify everyone who has subscriped except the user object specified in the optional
|
||||
* parameter $except_user.
|
||||
**/
|
||||
function notify_subscribers($threadID, $except_user=null) {
|
||||
if ($except_user){
|
||||
$extra = " and userid!=".intval($except_user->id);
|
||||
} else {
|
||||
$extra = "";
|
||||
}
|
||||
$sql = "SELECT DISTINCT * FROM subscriptions WHERE threadid = " . $threadID.$extra;
|
||||
$result = mysql_query($sql);
|
||||
|
||||
while ($row = mysql_fetch_object($result)) {
|
||||
|
|
|
@ -85,7 +85,7 @@ if (!empty($_POST['content'])) {
|
|||
}
|
||||
|
||||
replyToThread($thread_id, $logged_in_user->id, $_POST['content'], $parent_post, $add_signature);
|
||||
notify_subscribers($thread_id);
|
||||
notify_subscribers($thread_id, $logged_in_user); //Notify all subscribers except the user who posted (if the user has also subscribed)
|
||||
header('Location: forum_thread.php?id='.$thread_id);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue