Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql,v diff -u -r1.25 -r1.26 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 23 Aug 2001 22:50:44 -0000 1.25 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 25 Aug 2001 14:22:32 -0000 1.26 @@ -618,7 +618,7 @@ v_template_id cr_templates.template_id%TYPE; v_child_type record; v_rel_type record; - v_pub_wf record; + -- v_pub_wf record; begin -- validate children @@ -688,26 +688,29 @@ -- KG: logic is wrong here. Only the latest workflow matters, and even -- that is a little problematic because more than one workflow may be -- open on an item. In addition, this should be moved to CMS. + + -- Removed this as having workflow stuff in the CR is just plain wrong. + -- DanW, Aug 25th, 2001. - for v_pub_wf in select - case_id, state - from - wf_cases - where - workflow_key = ''publishing_wf'' - and - object_id = is_publishable__item_id + -- for v_pub_wf in select + -- case_id, state + -- from + -- wf_cases + -- where + -- workflow_key = ''publishing_wf'' + -- and + -- object_id = is_publishable__item_id + -- + -- LOOP + -- if v_pub_wf.state != ''finished'' then + -- return ''f''; + -- end if; + -- end loop; - LOOP - if v_pub_wf.state != ''finished'' then - return ''f''; - end if; - end loop; + -- if NOT FOUND then + -- return ''f''; + -- end if; - if NOT FOUND then - return ''f''; - end if; - return ''t''; end;' language 'plpgsql'; @@ -781,23 +784,26 @@ returns integer as ' declare delete__item_id alias for $1; - v_wf_cases_val record; + -- v_wf_cases_val record; v_symlink_val record; v_revision_val record; v_rel_val record; begin - raise NOTICE ''Deleting associated workflows...''; + -- Removed this as having workflow stuff in the CR is just plain wrong. + -- DanW, Aug 25th, 2001. + + -- raise NOTICE ''Deleting associated workflows...''; -- 1) delete all workflow cases associated with this item - for v_wf_cases_val in select - case_id - from - wf_cases - where - object_id = delete__item_id - LOOP - PERFORM workflow_case__delete(v_wf_cases_val.case_id); - end loop; + -- for v_wf_cases_val in select + -- case_id + -- from + -- wf_cases + -- where + -- object_id = delete__item_id + -- LOOP + -- PERFORM workflow_case__delete(v_wf_cases_val.case_id); + -- end loop; raise NOTICE ''Deleting symlinks...''; -- 2) delete all symlinks to this item