Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-forum
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-forum
Commits
e7d78ef2
Commit
e7d78ef2
authored
Dec 28, 2010
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- change outgoing mail API to acs_mail_simple
- changed localization to include forum subject in mail notification
parent
8e99d6dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
7 deletions
+24
-7
new-2.tcl
www/new-2.tcl
+3
-3
new-3.tcl
www/new-3.tcl
+21
-4
No files found.
www/new-2.tcl
View file @
e7d78ef2
...
@@ -499,12 +499,13 @@ while {"" != $parent_id && 0 != $parent_id && $ctr < 10} {
...
@@ -499,12 +499,13 @@ while {"" != $parent_id && 0 != $parent_id && $ctr < 10} {
set
org_message
""
set
org_message
""
if
{
$include
_topic_message_p
}
{
set org_message
"
$message
\n\n
"
}
if
{
$include
_topic_message_p
}
{
set org_message
"
$message
\n\n
"
}
set
action_type_found 0
set
action_type_found 0
switch
$action
_type
{
switch
$action
_type
{
"new_message"
{
"new_message"
{
set action_type_found 1
set action_type_found 1
set importance 2
set importance 2
set subject
[
lang::message::lookup
""
intranet-forum.New_topic_in_object
"New
$topic
_type in
$object
_name:
$subject
"
]
set subject
[
lang::message::lookup
""
intranet-forum.New_topic_in_object
2
"New
$topic
_type in
$object
_name:
$subject
"
]
set message
"
set message
"
$org
_message
$org
_message
[
_ intranet-forum.lt_A_new_topic_type_has_
]
\n
"
[
_ intranet-forum.lt_A_new_topic_type_has_
]
\n
"
...
@@ -513,14 +514,13 @@ $org_message
...
@@ -513,14 +514,13 @@ $org_message
"reply_message"
{
"reply_message"
{
set action_type_found 1
set action_type_found 1
set importance 1
set importance 1
set subject
[
lang::message::lookup
""
intranet-forum.Reply_to_topic
"Reply to
$topic
_type in
$object
_name:
$subject
"
]
set subject
[
lang::message::lookup
""
intranet-forum.Reply_to_topic
2
"Reply to
$topic
_type in
$object
_name:
$subject
"
]
set message
"
set message
"
$org
_message
$org
_message
[
_ intranet-forum.lt_A_new_topic_type_has_
]
\n
"
[
_ intranet-forum.lt_A_new_topic_type_has_
]
\n
"
}
}
}
}
if
{
!$action_type_found
}
{
if
{
!$action_type_found
}
{
switch
$actions
{
switch
$actions
{
...
...
www/new-3.tcl
View file @
e7d78ef2
...
@@ -34,6 +34,12 @@ set user_id [ad_maybe_redirect_for_registration]
...
@@ -34,6 +34,12 @@ set user_id [ad_maybe_redirect_for_registration]
set
user_is_employee_p
[
im_user_is_employee_p
$user
_id
]
set
user_is_employee_p
[
im_user_is_employee_p
$user
_id
]
set
user_is_customer_p
[
im_user_is_customer_p
$user
_id
]
set
user_is_customer_p
[
im_user_is_customer_p
$user
_id
]
# Determine the sender address
set
sender_email
[
ad_parameter -package_id
[
ad_acs_kernel_id
]
SystemOwner
""
[
ad_system_owner
]]
catch
{
set sender_email
[
db_string sender_email
"select email as sender_email from parties where party_id = :current_user_id"
-default
$sender
_email
]
}
# Permissions - who should see what
# Permissions - who should see what
set
permission_clause
"
set
permission_clause
"
...
@@ -138,7 +144,9 @@ set stakeholder_sql2 "
...
@@ -138,7 +144,9 @@ set stakeholder_sql2 "
"
"
set
stakeholder_sql
"
set
stakeholder_sql
"
select user_id as stakeholder_id
select distinct
user_id as stakeholder_id,
email as stakeholder_email
from (
$stakeholder
_sql2) t
from (
$stakeholder
_sql2) t
"
"
...
@@ -152,9 +160,18 @@ db_foreach update_stakeholders $stakeholder_sql {
...
@@ -152,9 +160,18 @@ db_foreach update_stakeholders $stakeholder_sql {
ns_log Notice
"forum/new-3: stakeholder_id=
$stakeholder
_id"
ns_log Notice
"forum/new-3: stakeholder_id=
$stakeholder
_id"
if
{[
lsearch
$notifyee
_id
$stakeholder
_id
]
> -1
}
{
if
{[
lsearch
$notifyee
_id
$stakeholder
_id
]
> -1
}
{
ns_log Notice
"intranet-forum/new-3: Sending out alert: '
$subject
'"
set subject
[
string
trim
$subject
]
im_send_alert
$stakeholder
_id
"hourly"
$subject
"
$msg
_url
\n\n
$message
"
if
{[
catch
{
acs_mail_lite::send
\
-send_immediately
\
-to_addr
$stakeholder
_email
\
-from_addr
$sender
_email
\
-subject
$subject
\
-body
"
$msg
_url
\n\n
$message
"
}
errmsg
]}
{
ad_return_error
$subject
"<p>Error sending out mail:</p><div><code>
[
ad_quotehtml
$errmsg
]
</code></div>"
ad_script_abort
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment