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
48b7400e
Commit
48b7400e
authored
Feb 08, 2017
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed creation scripts for OpenACS Installer
parent
a69efb0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
intranet-forum-create.sql
sql/postgresql/intranet-forum-create.sql
+43
-0
No files found.
sql/postgresql/intranet-forum-create.sql
View file @
48b7400e
...
...
@@ -205,6 +205,49 @@ for each row
execute
procedure
im_forum_topics_update_tr
();
-----------------------------------------------------------
-- TSearch2 Full-Text Search Engine
--
insert
into
im_search_object_types
values
(
2
,
'im_forum_topic'
,
0
.
5
);
create
or
replace
function
im_forum_topics_tsearch
()
returns
trigger
as
$$
declare
v_string
varchar
;
begin
select
coalesce
(
topic_name
,
''
)
||
' '
||
coalesce
(
subject
,
''
)
||
' '
||
coalesce
(
message
,
''
)
into
v_string
from
im_forum_topics
where
topic_id
=
new
.
topic_id
;
RAISE
NOTICE
'TSearch2: Updating forum_topic % of %: %'
,
new
.
topic_id
,
new
.
object_id
,
v_string
;
perform
im_search_update
(
new
.
topic_id
,
'im_forum_topic'
,
new
.
object_id
,
v_string
);
return
new
;
end
;
$$
language
'plpgsql'
;
CREATE
TRIGGER
im_forum_topics_tsearch_tr
AFTER
INSERT
or
UPDATE
ON
im_forum_topics
FOR
EACH
ROW
EXECUTE
PROCEDURE
im_forum_topics_tsearch
();
--------------------------------------------------------------
-- A function that decides whether a specific user can see a
-- forum item or not. Take into account permformance because
-- it's going to be a huge number of topics and take into
...
...
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