fs_root_folder [ -package_id package_id ]
Returns the root folder for the file storage system.
Index: openacs-4/packages/forums/forums.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/forums.info,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/forums/forums.info 16 Jan 2003 13:48:21 -0000 1.16
+++ openacs-4/packages/forums/forums.info 17 May 2003 10:40:57 -0000 1.17
@@ -20,127 +20,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: openacs-4/packages/forums/sql/oracle/forums-messages-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/oracle/forums-messages-create.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/forums/sql/oracle/forums-messages-create.sql 16 Jan 2003 13:48:49 -0000 1.5
+++ openacs-4/packages/forums/sql/oracle/forums-messages-create.sql 17 May 2003 10:41:35 -0000 1.6
@@ -58,6 +58,9 @@
-- We do a some big queries on forum_id (thread count on index.tcl) so create a second index
-- ordered so it's useful for them
create unique index forums_mess_forum_sk_un on forums_messages(forum_id, tree_sortkey);
+-- Need these for RI checks
+create index forums_messages_user_id_idx ON forums_messages(user_id);
+create index forums_messages_parent_id_idx ON forums_messages(parent_id);
create view forums_messages_approved as
select *
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/forums/sql/oracle/upgrade-0.3d-0.4d.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/forums/sql/postgresql/forums-forums-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-forums-create.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/forums/sql/postgresql/forums-forums-create.sql 30 Nov 2002 17:35:03 -0000 1.5
+++ openacs-4/packages/forums/sql/postgresql/forums-forums-create.sql 17 May 2003 10:42:08 -0000 1.6
@@ -70,7 +70,7 @@
package_id integer
constraint forums_package_id_nn
not null,
- last_post timestamp
+ last_post timestamptz
);
create view forums_forums_enabled
Index: openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql 21 Dec 2002 22:28:17 -0000 1.8
+++ openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql 17 May 2003 10:42:08 -0000 1.9
@@ -13,7 +13,7 @@
select define_function_args('forums_forum__new','forum_id,object_type;forums_forum,name,charter,presentation_type,posting_policy,package_id,creation_date,creation_user,creation_ip,context_id');
-create function forums_forum__new (integer,varchar,varchar,varchar,varchar,varchar,integer,timestamp with time zone,integer,varchar,integer)
+create function forums_forum__new (integer,varchar,varchar,varchar,varchar,varchar,integer,timestamptz,integer,varchar,integer)
returns integer as '
declare
p_forum_id alias for $1;
Index: openacs-4/packages/forums/sql/postgresql/forums-forums-package-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-forums-package-drop.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/forums/sql/postgresql/forums-forums-package-drop.sql 12 Jun 2002 15:24:02 -0000 1.2
+++ openacs-4/packages/forums/sql/postgresql/forums-forums-package-drop.sql 17 May 2003 10:42:08 -0000 1.3
@@ -11,7 +11,7 @@
-- chunks lifted from Gilbert. Thanks Orchard Labs!
--
-drop function forums_forum__new (integer,varchar,varchar,varchar,varchar,varchar,integer,timestamp,integer,varchar,integer);
+drop function forums_forum__new (integer,varchar,varchar,varchar,varchar,varchar,integer,timestamptz,integer,varchar,integer);
drop function forums_forum__name(integer);
Index: openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql 16 Jan 2003 13:49:10 -0000 1.7
+++ openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql 17 May 2003 10:42:08 -0000 1.8
@@ -31,8 +31,8 @@
references users(user_id)
constraint forums_mess_user_id_nn
not null,
- posting_date timestamp
- default now()
+ posting_date timestamptz
+ default current_timestamp
constraint forum_mess_post_date_nn
not null,
state varchar(100)
@@ -50,15 +50,19 @@
check (open_p in ('t','f')),
tree_sortkey varbit,
max_child_sortkey varbit,
- last_child_post timestamp,
+ last_child_post timestamptz,
constraint forums_mess_sk_forum_un
unique (tree_sortkey, forum_id)
);
-- We do a some big queries on forum_id (thread count on index.tcl) so create a second index
-- ordered so it's useful for them
create unique index forums_mess_forum_sk_un on forums_messages(forum_id, tree_sortkey);
+-- Need these two for RI checks
+create index forums_messages_user_id_idx ON forums_messages(user_id);
+create index forums_messages_parent_id_idx ON forums_messages(parent_id);
+
create view forums_messages_approved
as
select *
Index: openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql 16 Jan 2003 13:49:10 -0000 1.11
+++ openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql 17 May 2003 10:42:08 -0000 1.12
@@ -13,7 +13,7 @@
select define_function_args ('forums_message__new', 'message_id,object_type;forums_message,forum_id,subject,content,html_p,user_id,posting_date,state,parent_id,creation_date,creation_user,creation_ip,context_id');
-create function forums_message__new (integer,varchar,integer,varchar,text,char,integer,timestamp with time zone,varchar,integer,timestamp with time zone,integer,varchar,integer)
+create function forums_message__new (integer,varchar,integer,varchar,text,char,integer,timestamptz,varchar,integer,timestamptz,integer,varchar,integer)
returns integer as '
declare
p_message_id alias for $1;
Index: openacs-4/packages/forums/sql/postgresql/forums-messages-package-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-messages-package-drop.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/forums/sql/postgresql/forums-messages-package-drop.sql 12 Jun 2002 15:24:02 -0000 1.2
+++ openacs-4/packages/forums/sql/postgresql/forums-messages-package-drop.sql 17 May 2003 10:42:08 -0000 1.3
@@ -11,7 +11,7 @@
-- chunks lifted from Gilbert. Thanks Orchard Labs!
--
-drop function forums_message__new (integer,varchar,integer,varchar,text,char,integer,timestamp,varchar,integer,timestamp,integer,varchar,integer);
+drop function forums_message__new (integer,varchar,integer,varchar,text,char,integer,timestamptz,varchar,integer,timestamptz,integer,varchar,integer);
drop function forums_message__root_message_id (integer);
Index: openacs-4/packages/forums/sql/postgresql/upgrade-0.1d-0.2d.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/Attic/upgrade-0.1d-0.2d.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/forums/sql/postgresql/upgrade-0.1d-0.2d.sql 30 Nov 2002 17:35:03 -0000 1.2
+++ openacs-4/packages/forums/sql/postgresql/upgrade-0.1d-0.2d.sql 17 May 2003 10:42:08 -0000 1.3
@@ -1,10 +1,10 @@
-alter table forums_forums add column last_post timestamp;
-alter table forums_messages add column last_child_post timestamp;
+alter table forums_forums add column last_post timestamptz;
+alter table forums_messages add column last_child_post timestamptz;
create or replace function t () returns integer as '
declare
v_record record;
- v_timestamp timestamp;
+ v_timestamp timestamptz;
begin
for v_record in select forum_id
@@ -68,7 +68,7 @@
from forums_forums
where enabled_p = 't';
-create or replace function forums_message__new (integer,varchar,integer,varchar,text,char,integer,timestamp,varchar,integer,timestamp,integer,varchar,integer)
+create or replace function forums_message__new (integer,varchar,integer,varchar,text,char,integer,timestamptz,varchar,integer,timestamptz,integer,varchar,integer)
returns integer as '
declare
p_message_id alias for $1;
@@ -137,7 +137,7 @@
end;
' language 'plpgsql';
-create or replace function forums_forum__new (integer,varchar,varchar,varchar,varchar,varchar,integer,timestamp,integer,varchar,integer)
+create or replace function forums_forum__new (integer,varchar,varchar,varchar,varchar,varchar,integer,timestamptz,integer,varchar,integer)
returns integer as '
declare
p_forum_id alias for $1;
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/forums/sql/postgresql/upgrade-0.3d-0.4d.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/forums/tcl/forums-security-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-security-procs.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/forums/tcl/forums-security-procs.tcl 30 Nov 2002 17:35:17 -0000 1.5
+++ openacs-4/packages/forums/tcl/forums-security-procs.tcl 17 May 2003 10:42:46 -0000 1.6
@@ -57,7 +57,7 @@
{-user_id ""}
{-forum_id:required}
} {
- return [permission::permission_p -party_id $user_id -object_id $forum_id -privilege forum_write]
+ return [permission::permission_p -party_id $user_id -object_id $forum_id -privilege forum_create]
}
ad_proc -public require_post_forum {
Index: openacs-4/packages/forums/www/forum-view-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/forum-view-postgresql.xql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/forums/www/forum-view-postgresql.xql 10 Jan 2003 15:13:11 -0000 1.8
+++ openacs-4/packages/forums/www/forum-view-postgresql.xql 17 May 2003 10:43:31 -0000 1.9
@@ -14,7 +14,7 @@
from forums_messages_approved fm1
where fm1.forum_id = :forum_id
and fm1.tree_sortkey between tree_left(fm.tree_sortkey) and tree_right(fm.tree_sortkey)) as n_messages,
- to_char(fm.last_child_post, 'YYYY-MM-DD HH24:MI:SS') as last_child_post_ansi,
+ to_char(fm.last_child_post, 'Mon DD YYYY HH24:MI:SS') as last_child_post,
case when fm.last_child_post > (now() - interval '1 day') then 't' else 'f' end as new_p
from forums_messages_approved fm
where fm.forum_id = :forum_id
@@ -35,7 +35,7 @@
from forums_messages fm1
where fm1.forum_id = :forum_id
and fm1.tree_sortkey between tree_left(fm.tree_sortkey) and tree_right(fm.tree_sortkey)) as n_messages,
- to_char(fm.last_child_post, 'YYYY-MM-DD HH24:MI:SS') as last_child_post_ansi,
+ to_char(fm.last_child_post, 'Mon DD YYYY HH24:MI:SS') as last_child_post,
case when fm.last_child_post > (now() - interval '1 day') then 't' else 'f' end as new_p
from forums_messages_approved fm
where fm.forum_id = :forum_id
Index: openacs-4/packages/forums/www/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/index-postgresql.xql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/forums/www/index-postgresql.xql 16 Jan 2003 13:49:30 -0000 1.6
+++ openacs-4/packages/forums/www/index-postgresql.xql 17 May 2003 10:43:31 -0000 1.7
@@ -10,7 +10,7 @@
from forums_messages
where forums_messages.forum_id = forums_forums_enabled.forum_id
and parent_id is null) as n_threads,
- to_char(last_post, 'YYYY-MM-DD HH24:MI:SS') as last_post_ansi,
+ to_char(last_post, 'Mon DD YYYY HH24:MI:SS') as last_post,
case when last_post > (now() - interval '1 day') then 't' else 'f' end as new_p
from forums_forums_enabled
where forums_forums_enabled.package_id = :package_id
Index: openacs-4/packages/forums/www/message-post.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-post.tcl,v
diff -u -r1.20 -r1.21
--- openacs-4/packages/forums/www/message-post.tcl 20 Jan 2003 12:56:19 -0000 1.20
+++ openacs-4/packages/forums/www/message-post.tcl 17 May 2003 10:43:31 -0000 1.21
@@ -48,9 +48,11 @@
-html {rows 20 cols 60 wrap soft} \
-validate {
empty {expr ![empty_string_p [string trim $value]]} { [_ forums.lt_Please_enter_a_messag] }
- html { expr {( [string match [set l_html_p [ns_queryget html_p f]] "t"] && [empty_string_p [set v_message [ad_html_security_check $value]]] ) || [string match $l_html_p "f"] } } {}
+ html { expr {( [string match [set l_html_p [ns_queryget html_p f]] "t"] && [empty_string_p [set v_message [ad_quotehtml [ad_html_security_check $value]]]] ) || [string match $l_html_p "f"] } }
+ {}
}
+
element create message html_p \
-label [_ forums.Format] \
-datatype text \
@@ -183,10 +185,15 @@
# trim multiple leading Re:
regsub {^(\s*Re:\s*)*} $subject {Re: } subject
+
+ # see if they're allowed to add to this thread
+ forum::security::require_post_message -message_id $parent_id
+} else {
+ # no parent_id, therefore new thread
+ # require thread creation privs
+ forum::security::require_post_forum -forum_id $forum_id
}
-forum::security::require_post_forum -forum_id $forum_id
-
forum::get -forum_id $forum_id -array forum
# Prepare the other data
Index: openacs-4/packages/forums/www/message-view.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-view.tcl,v
diff -u -r1.17 -r1.18
--- openacs-4/packages/forums/www/message-view.tcl 26 Jan 2003 19:52:35 -0000 1.17
+++ openacs-4/packages/forums/www/message-view.tcl 17 May 2003 10:43:31 -0000 1.18
@@ -17,18 +17,18 @@
set table_bgcolor [parameter::get -parameter table_bgcolor]
set table_other_bgcolor [parameter::get -parameter table_other_bgcolor]
+# Load up the message information
+forum::message::get -message_id $message_id -array message
+set message(subject) [ad_quotehtml $message(subject)]
+
# Check if the user has admin on the message
set moderate_p [forum::security::can_moderate_message_p -message_id $message_id]
if {!${moderate_p}} {
- set post_p [forum::security::can_post_message_p -message_id $message_id]
+ set post_p [forum::security::can_post_forum_p -forum_id $message(forum_id)]
} else {
set post_p 1
}
-# Load up the message information
-forum::message::get -message_id $message_id -array message
-set message(subject) [ad_quotehtml $message(subject)]
-
form create search -action search
element create search search_text \
@@ -125,6 +125,16 @@
set reply_url "message-post?[export_vars { { parent_id $last_message_id } }]"
}
+if { $post_p || [ad_conn user_id] == 0 } {
+ set rowcount ${responses:rowcount}
+ if { $rowcount > 0 } {
+ set last_message_id [set "responses:${rowcount}(message_id)"]
+ } else {
+ set last_message_id $message(message_id)
+ }
+ set reply_url "message-post?[export_vars { { parent_id $last_message_id } }]"
+}
+
if {[string equal $forum(presentation_type) flat]} {
ad_return_template "message-view-flat"
} else {
Index: openacs-4/packages/gatekeeper/gatekeeper.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/gatekeeper/gatekeeper.info,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/gatekeeper/gatekeeper.info 20 Apr 2001 20:51:11 -0000 1.1
+++ openacs-4/packages/gatekeeper/gatekeeper.info 17 May 2003 10:44:02 -0000 1.2
@@ -16,7 +16,7 @@
2001-01-19
ArsDigita Corporation
-
+
Index: openacs-4/packages/general-comments/general-comments.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/general-comments.info,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/general-comments/general-comments.info 30 Jan 2003 13:13:39 -0000 1.8
+++ openacs-4/packages/general-comments/general-comments.info 17 May 2003 10:44:33 -0000 1.9
@@ -19,108 +19,10 @@
OpenACS
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: openacs-4/packages/general-comments/www/file-add-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/file-add-2.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/general-comments/www/file-add-2.tcl 7 Nov 2002 08:32:49 -0000 1.4
+++ openacs-4/packages/general-comments/www/file-add-2.tcl 17 May 2003 10:45:05 -0000 1.5
@@ -51,17 +51,8 @@
# remove the first . from the file extension
regsub {\.} $file_extension "" file_extension
-set guessed_file_type [ns_guesstype $upload_file]
+set guessed_file_type [cr_filename_to_mime_type -create $upload_file]
-# if the guessed_file_type is not an entry in
-# cr_mime_types, then set it as null
-if { ![db_0or1row is_mime_type_valid {
- select mime_type
- from cr_mime_types
- where mime_type = :guessed_file_type }] } {
- set guessed_file_type [db_null]
-}
-
# strip off the C:\directories... crud and just get the file name
if ![regexp {([^/\\]+)$} $upload_file match client_filename] {
# couldn't find a match
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/general-comments/www/file-add-2.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/glossary/glossary.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossary/glossary.info,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/glossary/glossary.info 23 Sep 2002 23:32:21 -0000 1.5
+++ openacs-4/packages/glossary/glossary.info 17 May 2003 10:45:36 -0000 1.6
@@ -24,7 +24,7 @@
glossary's content will be stored in the content repository and its presentation will use the ArsDigita Templating System (ATS).
-
+
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/logger/todo.txt'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/monitoring/monitoring.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/monitoring/monitoring.info,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/monitoring/monitoring.info 23 Aug 2002 03:39:12 -0000 1.5
+++ openacs-4/packages/monitoring/monitoring.info 17 May 2003 10:46:40 -0000 1.6
@@ -19,7 +19,7 @@
OpenACS
The monitoring apps from ACS 3.4.x /admin/monitoring directory. Includes Cassandracle, Watchdog, etc.
-
+
|