Commit b76b7eb3 authored by Frank Bergmann's avatar Frank Bergmann

- Fixed alerts for forums

	- Fixed bug in im_send_alert
	- Cleaned up code in forum/www/new-2.tc
parent 87fba90e
...@@ -546,9 +546,17 @@ db_foreach update_stakeholders $stakeholder_sql { ...@@ -546,9 +546,17 @@ db_foreach update_stakeholders $stakeholder_sql {
ns_log Notice "intranet-forum/new-2: Sending alerts: user_id=$stakeholder_id, importance=$importance, receive_updates=$receive_updates" ns_log Notice "intranet-forum/new-2: Sending alerts: user_id=$stakeholder_id, importance=$importance, receive_updates=$receive_updates"
if {$importance == 0} { continue } switch $receive_updates {
if {[string compare $receive_updates "none"]} { continue } none {
if {$importance < 2 && [string compare $receive_updates "major"]} { continue } continue
}
major {
if {$importance < 2} { continue }
}
all {
# Nothing - receive the message
}
}
ns_log Notice "intranet-forum/new-2: Sending out alert: '$subject'" ns_log Notice "intranet-forum/new-2: Sending out alert: '$subject'"
im_send_alert $stakeholder_id "hourly" $subject "$msg_url\n\n$message" im_send_alert $stakeholder_id "hourly" $subject "$msg_url\n\n$message"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment