oracle8.1.6
begin
:1 := static_page.new_folder (
name => :directory,
label => :directory,
parent_id => :parent_folder_id,
description => 'Static pages folder'
);
end;
update cr_revisions set content = empty_blob()
where revision_id = content_item.get_live_revision(:static_page_id)
returning content into :1
select static_page_id from static_pages
where filename = :sp_filename
begin
:1 := static_page.new(
filename => :sp_filename,
title => :page_title,
folder_id => :parent_folder_id
);
end;
update cr_revisions set content = empty_blob()
where revision_id = content_item.get_live_revision(:static_page_id)
returning content into :1
begin
static_page.delete_stale_items(:sync_session_id,:package_id);
delete from sp_extant_folders where session_id = :sync_session_id;
delete from sp_extant_files where session_id = :sync_session_id;
end;
begin
:1 := static_page.get_root_folder(:package_id);
end;
select content as file_from_db from cr_revisions
where revision_id = content_item.get_live_revision(:static_page_id)
select nvl((select item_id from cr_items where name=:cumulative_path),0)
from dual
update static_pages set show_comments_p = :show_full_comments_p
where static_page_id in (
select static_page_id from static_pages
where folder_id in (
select folder_id from sp_folders
start with folder_id = :root_folder_id
connect by parent_id = prior folder_id)
and filename like '%${contained_string}%'
)
begin
for file_row in (
select static_page_id from static_pages
where folder_id in (
select folder_id from sp_folders
start with folder_id = :root_folder_id
connect by parent_id = prior folder_id)
and filename like '%${contained_string}%'
) loop
acs_permission.${grant_or_revoke}_permission(
object_id => file_row.static_page_id,
grantee_id => acs.magic_object_id('the_public'),
privilege => 'general_comments_create'
);
end loop;
end;
select static_page_id from static_pages
where folder_id in (
select folder_id from sp_folders
start with folder_id = :root_folder_id
connect by parent_id = prior folder_id)
and filename like '%${contained_string}%'
select '{'||content_item.get_title($page_id)||'} '||decode(show_comments_p,'t',1,0) from static_pages where static_page_id = :page_id