Commit 02217349 authored by Frank Bergmann's avatar Frank Bergmann

- fixed syntax error from OpenACS

parent 94099492
-- source was undeclared.
-- fraber 110322: fixed syntax error from OpenACS?!?
create or replace function category_tree__copy (
integer, -- source_tree
integer, -- dest_tree
......@@ -24,6 +27,7 @@ begin
for source in (select category_id, parent_id, left_ind, right_ind from categories where tree_id = p_source_tree) loop
v_category_id := acs_object__new (
null,
''category'', -- object_type
now(), -- creation_date
p_creation_user, -- creation_user
......@@ -38,11 +42,11 @@ begin
end loop;
-- correct parent_ids
update categories c
update categories
set parent_id = (select t.category_id
from categories s, categories t
where s.category_id = c.parent_id
and t.tree_id = copy.dest_tree
where s.category_id = categories.parent_id
and t.tree_id = p_dest_tree
and s.left_ind + v_new_left_ind = t.left_ind)
where tree_id = p_dest_tree;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment