Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acs-messaging
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
acs-messaging
Commits
d206f221
Commit
d206f221
authored
Oct 19, 2010
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Upgrade to V4.0
parent
4edc0218
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
298 additions
and
160 deletions
+298
-160
acs-messaging.info
acs-messaging.info
+8
-6
acs-messaging-create.sql
sql/oracle/acs-messaging-create.sql
+5
-7
acs-messaging-packages.sql
sql/oracle/acs-messaging-packages.sql
+26
-14
acs-messaging-create.sql
sql/postgresql/acs-messaging-create.sql
+7
-7
acs-messaging-drop.sql
sql/postgresql/acs-messaging-drop.sql
+11
-0
acs-messaging-packages.sql
sql/postgresql/acs-messaging-packages.sql
+223
-75
acs-messaging-init.tcl
tcl/acs-messaging-init.tcl
+1
-2
acs-messaging-procs-postgresql.xql
tcl/acs-messaging-procs-postgresql.xql
+0
-1
acs-messaging-procs.tcl
tcl/acs-messaging-procs.tcl
+15
-46
design.html
www/doc/design.html
+2
-2
No files found.
acs-messaging.info
View file @
d206f221
...
...
@@ -2,26 +2,28 @@
<!-- Generated by the OpenACS Package Manager -->
<package
key=
"acs-messaging"
url=
"http://openacs.org/repository/apm/packages/acs-messaging/"
type=
"apm_service"
>
<license>
GPL V2.0 or any later version
</license>
<package-name>
Messaging
</package-name>
<pretty-plural>
Messaging Services
</pretty-plural>
<initial-install-p>
t
</initial-install-p>
<singleton-p>
t
</singleton-p>
<version
name=
"5.
1.5"
url=
"http://openacs.org/repository/download/apm/acs-messaging-5.1.5
.apm"
>
<version
name=
"5.
6.0"
url=
"http://openacs.org/repository/download/apm/acs-messaging-5.6.0
.apm"
>
<owner
url=
"mailto:akk+@cs.cmu.edu"
>
Anukul Kapoor
</owner>
<owner
url=
"mailto:prevost@maya.com"
>
John Prevost
</owner>
<owner
url=
"mailto:vinod@kurup.com"
>
Vinod Kurup
</owner>
<summary>
General messaging for bboard and general comments.
</summary>
<release-date>
20
04-02-28
</release-date>
<release-date>
20
10-06-17
</release-date>
<maturity>
3
</maturity>
<vendor
url=
"http://openacs.org"
>
OpenACS
</vendor>
<license
url=
"http://www.gnu.org/copyleft/gpl.html"
>
GPL
</license>
<maturity>
3
</maturity>
<description
format=
"text/html"
>
Provides generic message services, with email sending. acs-mail-lite and notifications are the
prefered packages for delivering this functionality and it is anticipated that this package will ultimately be deprecated.
</description>
<provides
url=
"acs-messaging"
version=
"5.1.4"
/>
<requires
url=
"acs-content-repository"
version=
"5.0.0"
/>
<requires
url=
"acs-kernel"
version=
"5.0.0"
/>
<provides
url=
"acs-messaging"
version=
"5.6.0"
/>
<requires
url=
"acs-content-repository"
version=
"5.6.0"
/>
<requires
url=
"acs-kernel"
version=
"5.6.0"
/>
<requires
url=
"acs-mail-lite"
version=
"5.6.0"
/>
<callbacks>
</callbacks>
...
...
sql/oracle/acs-messaging-create.sql
View file @
d206f221
...
...
@@ -17,9 +17,9 @@ begin
object_type
=>
'acs_message'
,
pretty_name
=>
'Message'
,
pretty_plural
=>
'Messages'
,
table_name
=>
'
ACS_MESSAGES
'
,
id_column
=>
'
MESSAGE_ID
'
,
name_method
=>
'
ACS_MESSAGE.NAME
'
table_name
=>
'
acs_messages
'
,
id_column
=>
'
message_id
'
,
name_method
=>
'
acs_message.name
'
);
acs_object_type
.
create_type
(
...
...
@@ -27,9 +27,7 @@ begin
object_type
=>
'acs_message_revision'
,
pretty_name
=>
'Message Revision'
,
pretty_plural
=>
'Message Revisions'
,
table_name
=>
'CR_REVISIONS'
,
id_column
=>
'REVISION_ID'
,
name_method
=>
'ACS_OBJECT.DEFAULT_NAME'
name_method
=>
'acs_object.default_name'
);
end
;
...
...
@@ -42,7 +40,7 @@ create table acs_messages ( -- extends cr_items
message_id
integer
constraint
acs_messages_message_id_fk
references
cr_items
(
item_id
)
on
delete
cascade
constraint
acs_messages_pk
constraint
acs_messages_
message_id_
pk
primary
key
,
-- we will need to find a way to make reply_to go to 0 instead of null
-- to improve scalability
...
...
sql/oracle/acs-messaging-packages.sql
View file @
d206f221
...
...
@@ -21,13 +21,14 @@ as
mime_type
in
cr_revisions
.
mime_type
%
TYPE
default
'text/plain'
,
text
in
varchar2
default
null
,
data
in
cr_revisions
.
content
%
TYPE
default
null
,
parent_id
in
cr_items
.
parent_id
%
TYPE
default
0
,
parent_id
in
cr_items
.
parent_id
%
TYPE
default
-
4
,
context_id
in
acs_objects
.
context_id
%
TYPE
,
creation_date
in
acs_objects
.
creation_date
%
TYPE
default
sysdate
,
creation_user
in
acs_objects
.
creation_user
%
TYPE
default
null
,
creation_ip
in
acs_objects
.
creation_ip
%
TYPE
default
null
,
object_type
in
acs_objects
.
object_type
%
TYPE
default
'acs_message'
,
is_live
in
char
default
't'
is_live
in
char
default
't'
,
package_id
in
acs_objects
.
package_id
%
TYPE
default
null
)
return
acs_objects
.
object_id
%
TYPE
;
function
edit
(
...
...
@@ -88,7 +89,8 @@ as
creation_user
in
acs_objects
.
creation_user
%
TYPE
default
null
,
creation_ip
in
acs_objects
.
creation_ip
%
TYPE
default
null
,
is_live
in
char
default
't'
,
storage_type
in
cr_items
.
storage_type
%
TYPE
default
'file'
storage_type
in
cr_items
.
storage_type
%
TYPE
default
'file'
,
package_id
in
acs_objects
.
package_id
%
TYPE
default
null
)
return
acs_objects
.
object_id
%
TYPE
;
function
edit_file
(
...
...
@@ -121,7 +123,8 @@ as
creation_user
in
acs_objects
.
creation_user
%
TYPE
default
null
,
creation_ip
in
acs_objects
.
creation_ip
%
TYPE
default
null
,
is_live
in
char
default
't'
,
storage_type
in
cr_items
.
storage_type
%
TYPE
default
'file'
storage_type
in
cr_items
.
storage_type
%
TYPE
default
'file'
,
package_id
in
acs_objects
.
package_id
%
TYPE
default
null
)
return
acs_objects
.
object_id
%
TYPE
;
function
edit_image
(
...
...
@@ -151,7 +154,8 @@ as
parent_id
in
acs_objects
.
context_id
%
TYPE
,
creation_date
in
acs_objects
.
creation_date
%
TYPE
default
sysdate
,
creation_user
in
acs_objects
.
creation_user
%
TYPE
default
null
,
creation_ip
in
acs_objects
.
creation_ip
%
TYPE
default
null
creation_ip
in
acs_objects
.
creation_ip
%
TYPE
default
null
,
package_id
in
acs_objects
.
package_id
%
TYPE
default
null
)
return
cr_extlinks
.
extlink_id
%
TYPE
;
function
edit_extlink
(
...
...
@@ -187,13 +191,14 @@ as
mime_type
in
cr_revisions
.
mime_type
%
TYPE
default
'text/plain'
,
text
in
varchar2
default
null
,
data
in
cr_revisions
.
content
%
TYPE
default
null
,
parent_id
in
cr_items
.
parent_id
%
TYPE
default
0
,
parent_id
in
cr_items
.
parent_id
%
TYPE
default
-
4
,
context_id
in
acs_objects
.
context_id
%
TYPE
,
creation_date
in
acs_objects
.
creation_date
%
TYPE
default
sysdate
,
creation_user
in
acs_objects
.
creation_user
%
TYPE
default
null
,
creation_ip
in
acs_objects
.
creation_ip
%
TYPE
default
null
,
object_type
in
acs_objects
.
object_type
%
TYPE
default
'acs_message'
,
is_live
in
char
default
't'
is_live
in
char
default
't'
,
package_id
in
acs_objects
.
package_id
%
TYPE
default
null
)
return
acs_objects
.
object_id
%
TYPE
is
v_message_id
acs_messages
.
message_id
%
TYPE
;
...
...
@@ -226,7 +231,8 @@ as
creation_date
=>
creation_date
,
creation_user
=>
creation_user
,
creation_ip
=>
creation_ip
,
item_subtype
=>
object_type
item_subtype
=>
object_type
,
package_id
=>
package_id
);
insert
into
acs_messages
...
...
@@ -394,7 +400,8 @@ as
creation_user
in
acs_objects
.
creation_user
%
TYPE
default
null
,
creation_ip
in
acs_objects
.
creation_ip
%
TYPE
default
null
,
is_live
in
char
default
't'
,
storage_type
in
cr_items
.
storage_type
%
TYPE
default
'file'
storage_type
in
cr_items
.
storage_type
%
TYPE
default
'file'
,
package_id
in
acs_objects
.
package_id
%
TYPE
default
null
)
return
acs_objects
.
object_id
%
TYPE
is
v_file_id
cr_items
.
item_id
%
TYPE
;
...
...
@@ -408,7 +415,8 @@ as
creation_date
=>
creation_date
,
creation_user
=>
creation_user
,
creation_ip
=>
creation_ip
,
storage_type
=>
storage_type
storage_type
=>
storage_type
,
package_id
=>
package_id
);
-- create an initial revision for the new attachment
...
...
@@ -482,7 +490,8 @@ as
creation_user
in
acs_objects
.
creation_user
%
TYPE
default
null
,
creation_ip
in
acs_objects
.
creation_ip
%
TYPE
default
null
,
is_live
in
char
default
't'
,
storage_type
in
cr_items
.
storage_type
%
TYPE
default
'file'
storage_type
in
cr_items
.
storage_type
%
TYPE
default
'file'
,
package_id
in
acs_objects
.
package_id
%
TYPE
default
null
)
return
acs_objects
.
object_id
%
TYPE
is
v_image_id
cr_items
.
item_id
%
TYPE
;
...
...
@@ -496,7 +505,8 @@ as
creation_date
=>
creation_date
,
creation_user
=>
creation_user
,
creation_ip
=>
creation_ip
,
storage_type
=>
storage_type
storage_type
=>
storage_type
,
package_id
=>
package_id
);
-- create an initial revision for the new attachment
...
...
@@ -580,7 +590,8 @@ as
parent_id
in
acs_objects
.
context_id
%
TYPE
,
creation_date
in
acs_objects
.
creation_date
%
TYPE
default
sysdate
,
creation_user
in
acs_objects
.
creation_user
%
TYPE
default
null
,
creation_ip
in
acs_objects
.
creation_ip
%
TYPE
default
null
creation_ip
in
acs_objects
.
creation_ip
%
TYPE
default
null
,
package_id
in
acs_objects
.
package_id
%
TYPE
default
null
)
return
cr_extlinks
.
extlink_id
%
TYPE
is
v_extlink_id
cr_extlinks
.
extlink_id
%
TYPE
;
...
...
@@ -594,7 +605,8 @@ as
extlink_id
=>
new_extlink
.
extlink_id
,
creation_date
=>
new_extlink
.
creation_date
,
creation_user
=>
new_extlink
.
creation_user
,
creation_ip
=>
new_extlink
.
creation_ip
creation_ip
=>
new_extlink
.
creation_ip
,
package_id
=>
new_extlink
.
package_id
);
end
new_extlink
;
...
...
sql/postgresql/acs-messaging-create.sql
View file @
d206f221
...
...
@@ -15,12 +15,12 @@ select acs_object_type__create_type (
'Message'
,
'Messages'
,
'content_item'
,
'
ACS_MESSAGES
'
,
'
MESSAGE_ID
'
,
'
acs_messages
'
,
'
message_id
'
,
null
,
'f'
,
null
,
'
ACS_MESSAGE.NAME
'
'
acs_message__name
'
);
select
acs_object_type__create_type
(
...
...
@@ -28,12 +28,12 @@ select acs_object_type__create_type (
'Message Revision'
,
'Message Revisions'
,
'content_revision'
,
'CR_REVISIONS'
,
'REVISION_ID'
,
null
,
null
,
null
,
'f'
,
null
,
'
ACS_OBJECT.DEFAULT_NAME
'
'
acs_object__default_name
'
);
...
...
@@ -43,7 +43,7 @@ create table acs_messages ( -- extends cr_items
message_id
integer
constraint
acs_messages_message_id_fk
references
cr_items
(
item_id
)
on
delete
cascade
constraint
acs_messages_pk
constraint
acs_messages_
message_id_
pk
primary
key
,
-- we will need to find a way to make reply_to go to 0 instead of null
-- to improve scalability
...
...
sql/postgresql/acs-messaging-drop.sql
View file @
d206f221
...
...
@@ -17,6 +17,9 @@ drop function acs_message__edit (integer,varchar,varchar,varchar,
drop
function
acs_message__new
(
integer
,
integer
,
timestamptz
,
integer
,
varchar
,
varchar
,
varchar
,
varchar
,
varchar
,
text
,
integer
,
integer
,
integer
,
varchar
,
varchar
,
boolean
);
drop
function
acs_message__new
(
integer
,
integer
,
timestamptz
,
integer
,
varchar
,
varchar
,
varchar
,
varchar
,
varchar
,
text
,
integer
,
integer
,
integer
,
varchar
,
varchar
,
boolean
,
integer
);
drop
function
acs_message__delete
(
integer
);
drop
function
acs_message__message_p
(
integer
);
drop
function
acs_message__send
(
integer
,
varchar
,
integer
,
timestamptz
);
...
...
@@ -25,18 +28,26 @@ drop function acs_message__first_ancestor (integer);
drop
function
acs_message__new_file
(
integer
,
integer
,
varchar
,
varchar
,
text
,
varchar
,
text
,
timestamptz
,
integer
,
varchar
,
boolean
);
drop
function
acs_message__new_file
(
integer
,
integer
,
varchar
,
varchar
,
text
,
varchar
,
text
,
timestamptz
,
integer
,
varchar
,
boolean
,
integer
);
drop
function
acs_message__edit_file
(
integer
,
varchar
,
text
,
varchar
,
text
,
timestamptz
,
integer
,
varchar
,
boolean
);
drop
function
acs_message__delete_file
(
integer
);
drop
function
acs_message__new_image
(
integer
,
integer
,
varchar
,
varchar
,
text
,
varchar
,
text
,
integer
,
integer
,
timestamptz
,
integer
,
varchar
,
boolean
);
drop
function
acs_message__new_image
(
integer
,
integer
,
varchar
,
varchar
,
text
,
varchar
,
text
,
integer
,
integer
,
timestamptz
,
integer
,
varchar
,
boolean
,
integer
);
drop
function
acs_message__edit_image
(
integer
,
varchar
,
text
,
varchar
,
text
,
integer
,
integer
,
timestamptz
,
integer
,
varchar
,
boolean
);
drop
function
acs_message__delete_image
(
integer
);
drop
function
acs_message__new_extlink
(
varchar
,
integer
,
varchar
,
varchar
,
text
,
integer
,
timestamptz
,
integer
,
varchar
);
drop
function
acs_message__new_extlink
(
varchar
,
integer
,
varchar
,
varchar
,
text
,
integer
,
timestamptz
,
integer
,
varchar
,
integer
);
drop
function
acs_message__edit_extlink
(
integer
,
varchar
,
varchar
,
text
);
drop
function
acs_message__delete_extlink
(
integer
);
drop
function
acs_message__name
(
integer
);
...
...
sql/postgresql/acs-messaging-packages.sql
View file @
d206f221
This diff is collapsed.
Click to expand it.
tcl/acs-messaging-init.tcl
View file @
d206f221
...
...
@@ -8,7 +8,6 @@ ad_library {
}
# Schedule every 15 minutes. Its own thread. since ns_sendmail does
# network activity.
# Schedule every 15 minutes
ad_schedule_proc -thread t 900 acs_messaging_process_queue
tcl/acs-messaging-procs-postgresql.xql
View file @
d206f221
...
...
@@ -50,7 +50,6 @@
where o.message_id = m.message_id
and p.party_id = m.sender
and wait_until
<
= current_timestamp
</querytext>
</fullquery>
...
...
tcl/acs-messaging-procs.tcl
View file @
d206f221
...
...
@@ -23,10 +23,10 @@ ad_page_contract_filter acs_message_id { name value } {
of an already-existing OpenACS message.
}
{
# empty is okay
(
handled by notnull
)
if
[
empty_string_p
$value
]
{
if
{
$value
eq
""
}
{
return 1
}
if
!
[
acs_message_p
$value
]
{
if
{
!
[
acs_message_p
$value
]}
{
ad_complain
"
$name
(
$value
) does not refer to a valid OpenACS message"
return 0
}
...
...
@@ -43,11 +43,11 @@ ad_proc -public acs_messaging_format_as_html {
@param mime_type MIME content-type of content
@param content Text to view
}
{
if
{
[
string
eq
$mime
_type
"text/plain"
]
}
{
if
{
$mime
_type eq
"text/plain"
}
{
set result
"<pre>
[
ad_quotehtml
$content
]
</pre>"
}
else
if
{
[
string
eq
$mime
_type
"text/plain; format=flowed"
]
}
{
}
else
if
{
$mime
_type eq
"text/plain; format=flowed"
}
{
set result
[
ad_text_to_html --
$content
]
}
else
if
{
[
string
eq
$mime
_type
"text/html"
]
}
{
}
else
if
{
$mime
_type eq
"text/html"
}
{
set result
$content
}
else
{
set result
"<i>content type undecipherable</i>"
...
...
@@ -140,49 +140,18 @@ ad_proc -private acs_messaging_process_queue {
}
{
Process the message queue, sending any reasonable messages.
}
{
db_foreach acs_message_send
{
select o.message_id as sending_message_id,
o.to_address as recip_email,
p.email as sender_email,
to_char
(
m.sent_date, 'Dy, DD Mon YYYY HH24:MI:SS'
)
as sent_date,
m.rfc822_id,
m.title,
m.mime_type,
m.content,
m2.rfc822_id as in_reply_to
from acs_messages_outgoing o,
acs_messages_all m,
acs_messages_all m2,
parties p
where o.message_id = m.message_id
and m2.message_id
(
+
)
= m.reply_to
and p.party_id = m.sender
and wait_until <= sysdate
}
{
# Need to process content to do CRLF conversions?
set headers
[
ns_set create
]
ns_set put
$headers
Sender
[
ad_parameter
"OutgoingSender"
"acs-kernel"
]
if !
[
string
equal
$in
_reply_to
""
]
{
ns_set put
$headers
In-Reply-To
"<
$in
_reply_to>"
}
ns_set put
$headers
Message-ID
"<
$rfc822
_id>"
ns_set put
$headers
Date
"
$sent
_date
[
acs_messaging_timezone_offset
]
"
ns_set put
$headers
MIME-Version
"1.0"
ns_set put
$headers
Content-Type
$mime
_type
ns_log
"Notice"
"About to send"
if !
[
catch
{
ns_sendmail
$recip
_email
$sender
_email
$title
$content
$headers
}
errMsg
]
{
ns_log
"Notice"
"Sending"
db_foreach acs_message_send
{}
{
if
{
!
[
catch
{
acs_mail_lite::send -send_immediately
\
-to_addr
$recip
_email
\
-from_addr
$sender
_email
\
-subject
$title
\
-body
$content
}
errMsg
]}
{
# everything went well, dequeue
db_dml acs_message_remove_from_queue
{
delete from acs_messages_outgoing
where message_id = :sending_message_id
and to_address = :recip_email
}
db_dml acs_message_remove_from_queue
{}
}
else
{
ns_log
"
Notice"
"Not sending
:
$err
Msg"
ns_log
"
Error"
"acs-messaging: Error processing queue
:
$err
Msg"
}
}
}
www/doc/design.html
View file @
d206f221
...
...
@@ -4,7 +4,7 @@
</head>
<body
bgcolor=
"#ffffff"
>
<h2>
ACS Messaging Design
</h2>
<hr
/
>
<hr>
ACS Messaging was born out of the design of the new bboard. One
thing we discovered when researching requirements for bboard and
...
...
@@ -76,7 +76,7 @@ create or replace view acs_messages_all as
ACS Messaging provides the PL/SQL function acs_message.post to
add new messages.
<hr
/
>
<hr>
<address>
akk@arsdigita.com
</address>
</body>
</html>
\ No newline at end of file
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