naughty_notify_admin

one of the documented procedures in this installation of the ACS
Usage:
naughty_notify_admin   subject   body   { log_p "0" }
What it does:
Notify Content Administrator of new naughtiness added
Defined in: /web/philip/tcl/ad-content-tagging.tcl

Source code:


    ns_share naughty_administrator_last_notified
    ns_share accumulated_naughtiness
    if $log_p {
	# usually the naughty text will be in the database anyway
	ns_log Notice "notify_naughty_admin: $subject\n\n$body\n\n"
    }
    if { [ns_time] > [expr $naughty_administrator_last_notified + 900] } {
	# more than 15 minutes have elapsed since last note
	set naughty_administrator_last_notified [ns_time]
	if [info exists accumulated_naughtiness] {
	    append body $accumulated_naughtiness
	}
	if [catch { ns_sendmail [naughty_administrator] [ad_system_owner] $subject $body } errmsg] {
	    ns_log Error "naughty_notify_admin failed sending email note to [naughty_administrator]"
	}
	# we're done sending body and accumulated naughtiness; reset var if necessary
	if [info exists accumulated_naughtiness] {
	    unset accumulated_naughtiness
	}
    } else {
	append accumulated_naughtiness "----------------------- [ns_localsqltimestamp]

Subject: $subject

BODY:

$body 

"
    }


philg@mit.edu