Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-create.sql,v diff -u -r1.22 -r1.23 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-create.sql 8 Sep 2001 23:38:24 -0000 1.22 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-create.sql 9 Sep 2001 18:09:09 -0000 1.23 @@ -1197,10 +1197,87 @@ drop function inline_1 (); + +create function inline_2 () +returns integer as ' +declare + v_item_id integer; + v_revision_id integer; +begin + + select acs_object_id_seq.nextval into v_item_id; + + PERFORM content_template__new( + ''default_template'', + ''-200'', + v_item_id, + now(), + null, + null + ); + + v_revision_id := content_revision__new( + ''Template'', + NULL, + now(), + ''text/html'', + null, + '''', + v_item_id, + NULL, + now(), + null, + null); + + update + cr_revisions + set + content_length = length(content) + where + revision_id = v_revision_id; + + update + cr_items + set + live_revision = v_revision_id + where + item_id = v_item_id; + + + PERFORM content_type__register_template( + ''content_revision'', + v_item_id, + ''public'', + ''f''); + + PERFORM content_type__set_default_template( + ''content_revision'', + v_item_id, + ''public'' ); + + PERFORM content_type__register_template( + ''image'', + v_item_id, + ''public'', + ''f''); + + PERFORM content_type__set_default_template( + ''image'', + v_item_id, + ''public'' ); + + return 0; +end;' language 'plpgsql'; + +select inline_2 (); + +drop function inline_2 (); + + -- show errors -- prompt *** Preparing search indices... -\i content-search.sql +-- \i content-search.sql Index: openacs-4/packages/acs-content-repository/tcl/search-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/search-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-content-repository/tcl/search-procs.tcl 8 Sep 2001 15:20:11 -0000 1.1 +++ openacs-4/packages/acs-content-repository/tcl/search-procs.tcl 9 Sep 2001 18:10:13 -0000 1.2 @@ -4,7 +4,7 @@ Provides data source for search interface. Used to access content items after search. } { - db_0or1row notes_datasource { + db_0or1row revisions_datasource { select r.revision_id as object_id, r.title as title, r.content as content, @@ -52,7 +52,7 @@ from site_nodes n where n.object_id = :package_id " - + return $url }