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.72 -r1.72.2.1
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql	3 May 2015 12:32:28 -0000	1.72
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql	25 Sep 2015 09:03:54 -0000	1.72.2.1
@@ -52,13 +52,8 @@
 -- new 19 param version of content_item__new (now its 20 with package_id)
 
 
--- old define_function_args('content_item__new','name,parent_id,item_id,locale,creation_date;now,creation_user,context_id,creation_ip,item_subtype;content_item,content_type;content_revision,title,description,mime_type;text/plain,nls_language,text,data,relation_tag,is_live;f,storage_type;null,package_id')
--- new
 select define_function_args('content_item__new','name,parent_id;null,item_id;null,locale;null,creation_date;now,creation_user;null,context_id;null,creation_ip;null,item_subtype;content_item,content_type;content_revision,title;null,description;null,mime_type;text/plain,nls_language;null,text;null,data;null,relation_tag;null,is_live;f,storage_type;null,package_id;null');
 
-
-
-
 --
 -- procedure content_item__new/20
 --
@@ -1057,9 +1052,9 @@
 END;
 $$ LANGUAGE plpgsql;
 
+
 select define_function_args('content_item__is_published','item_id');
 
-
 --
 -- procedure content_item__is_published/1
 --
@@ -1083,9 +1078,9 @@
 END;
 $$ LANGUAGE plpgsql stable;
 
+
 select define_function_args('content_item__is_publishable','item_id');
 
-
 --
 -- procedure content_item__is_publishable/1
 --
@@ -1205,9 +1200,9 @@
 END;
 $$ LANGUAGE plpgsql stable;
 
+
 select define_function_args('content_item__is_valid_child','item_id,content_type,relation_tag');
 
-
 --
 -- procedure content_item__is_valid_child/3
 --
@@ -1351,6 +1346,7 @@
 -- 6) delete keyword associations
 -- 7) delete all associated comments
 
+
 select define_function_args('content_item__del','item_id');
 
 --
@@ -1491,13 +1487,8 @@
 $$ LANGUAGE plpgsql;
 
 
--- old define_function_args('content_item__get_id','item_path,root_folder_id,resolve_index;f')
--- new
 select define_function_args('content_item__get_id','item_path,root_folder_id;null,resolve_index;f');
 
-
-
-
 --
 -- procedure content_item__get_id/3
 --
@@ -1688,11 +1679,10 @@
 END;
 $$ LANGUAGE plpgsql;
 
+
 -- I hard code the content_item_globals.c_root_folder_id here
 select define_function_args('content_item__get_virtual_path','item_id,root_folder_id;-100');
 
-
-
 --
 -- procedure content_item__get_virtual_path/2
 --
@@ -1729,7 +1719,6 @@
 
 
 
--- added
 select define_function_args('content_item__write_to_file','item_id,root_path');
 
 --
@@ -1762,10 +1751,9 @@
 END;
 $$ LANGUAGE plpgsql;
 
+
 select define_function_args('content_item__register_template','item_id,template_id,use_context');
 
-
-
 --
 -- procedure content_item__register_template/3
 --
@@ -1803,12 +1791,8 @@
 
 
 
--- old define_function_args('content_item__unregister_template','item_id,template_id,use_context')
--- new
 select define_function_args('content_item__unregister_template','item_id,template_id;null,use_context;null');
 
-
-
 --
 -- procedure content_item__unregister_template/3
 --
@@ -1853,10 +1837,9 @@
 END;
 $$ LANGUAGE plpgsql;
 
+
 select define_function_args('content_item__get_template','item_id,use_context');
 
-
-
 --
 -- procedure content_item__get_template/2
 --
@@ -1907,9 +1890,9 @@
 END;
 $$ LANGUAGE plpgsql stable strict;
 
+
 select define_function_args('content_item__get_content_type','item_id');
 
-
 --
 -- procedure content_item__get_content_type/1
 --
@@ -1932,12 +1915,10 @@
 END;
 $$ LANGUAGE plpgsql stable strict;
 
-select define_function_args('content_item__get_live_revision','item_id');
 
+
 select define_function_args('content_item__get_live_revision','item_id');
 
-
-
 --
 -- procedure content_item__get_live_revision/1
 --
@@ -1960,9 +1941,9 @@
 END;
 $$ LANGUAGE plpgsql stable strict;
 
+
 select define_function_args('content_item__set_live_revision','revision_id,publish_status;ready');
 
-
 --
 -- procedure content_item__set_live_revision/1
 --
@@ -2000,9 +1981,9 @@
 END;
 $$ LANGUAGE plpgsql;
 
+
 select define_function_args('content_item__set_live_revision','revision_id,publish_status;ready');
 
-
 --
 -- procedure content_item__set_live_revision/2
 --
@@ -2038,9 +2019,9 @@
 END;
 $$ LANGUAGE plpgsql;
 
+
 select define_function_args('content_item__unset_live_revision','item_id');
 
-
 --
 -- procedure content_item__unset_live_revision/1
 --
@@ -2072,13 +2053,9 @@
 $$ LANGUAGE plpgsql;
 
 
--- old define_function_args('content_item__set_release_period','item_id,start_when,end_when')
--- new
+
 select define_function_args('content_item__set_release_period','item_id,start_when;null,end_when;null');
 
-
-
-
 --
 -- procedure content_item__set_release_period/3
 --
@@ -2115,12 +2092,9 @@
 END;
 $$ LANGUAGE plpgsql;
 
-select define_function_args('content_item__get_revision_count','item_id');
 
 select define_function_args('content_item__get_revision_count','item_id');
 
-
-
 --
 -- procedure content_item__get_revision_count/1
 --
@@ -2143,9 +2117,9 @@
 END;
 $$ LANGUAGE plpgsql stable;
 
+
 select define_function_args('content_item__get_context','item_id');
 
-
 --
 -- procedure content_item__get_context/1
 --
@@ -2203,9 +2177,9 @@
 END;
 $$ LANGUAGE plpgsql;
 
+
 select define_function_args('content_item__move','item_id,target_folder_id,name');
 
-
 --
 -- procedure content_item__move/3
 --
@@ -2253,9 +2227,9 @@
 END;
 $$ LANGUAGE plpgsql;
 
+
 select define_function_args('content_item__generic_move','item_id,target_item_id,name');
 
-
 --
 -- procedure content_item__generic_move/3
 --
@@ -2341,8 +2315,6 @@
 -- 4) copy the latest revision from the original item to the new item (if any)
 
 
-
--- added
 select define_function_args('content_item__copy2','item_id,target_folder_id,creation_user,creation_ip;null');
 
 --
@@ -2371,12 +2343,8 @@
 $$ LANGUAGE plpgsql;
 
 
--- old define_function_args('content_item__copy','item_id,target_folder_id,creation_user,creation_ip,name')
--- new
 select define_function_args('content_item__copy','item_id,target_folder_id,creation_user,creation_ip;null,name;null');
 
-
-
 --
 -- procedure content_item__copy/5
 --
@@ -2534,10 +2502,8 @@
 $$ LANGUAGE plpgsql;
 
 
-
 select define_function_args('content_item__get_latest_revision','item_id');
 
-
 --
 -- procedure content_item__get_latest_revision/1
 --
@@ -2569,9 +2535,9 @@
 END;
 $$ LANGUAGE plpgsql strict stable;
 
+
 select define_function_args('content_item__get_best_revision','item_id');
 
-
 --
 -- procedure content_item__get_best_revision/1
 --
@@ -2596,9 +2562,8 @@
 END;
 $$ LANGUAGE plpgsql stable strict;
 
-select define_function_args('content_item__get_title','item_id,is_live;f');
 
-
+select define_function_args('content_item__get_title','item_id,is_live;f');
 --
 -- procedure content_item__get_title/2
 --
@@ -2671,9 +2636,8 @@
 END;
 $$ LANGUAGE plpgsql stable strict;
 
-select define_function_args('content_item__get_publish_date','item_id,is_live;f');
 
-
+select define_function_args('content_item__get_publish_date','item_id,is_live;f');
 --
 -- procedure content_item__get_publish_date/2
 --
@@ -2712,9 +2676,8 @@
 END;
 $$ LANGUAGE plpgsql stable;
 
-select define_function_args('content_item__is_subclass','object_type,supertype');
 
-
+select define_function_args('content_item__is_subclass','object_type,supertype');
 --
 -- procedure content_item__is_subclass/2
 --
@@ -2739,12 +2702,8 @@
 $$ LANGUAGE plpgsql stable;
 
 
--- old define_function_args('content_item__relate','item_id,object_id,relation_tag;generic,order_n,relation_type;cr_item_rel')
--- new
-select define_function_args('content_item__relate','item_id,object_id,relation_tag;generic,order_n;null,relation_type;cr_item_rel');
 
-
-
+select define_function_args('content_item__relate','item_id,object_id,relation_tag;generic,order_n;null,relation_type;cr_item_rel');
 --
 -- procedure content_item__relate/5
 --
@@ -2855,12 +2814,9 @@
 END;
 $$ LANGUAGE plpgsql;
 
-select define_function_args('content_item__unrelate','rel_id');
 
-select define_function_args('content_item__unrelate','rel_id');
 
-
-
+select define_function_args('content_item__unrelate','rel_id');
 --
 -- procedure content_item__unrelate/1
 --
@@ -2880,12 +2836,9 @@
 END;
 $$ LANGUAGE plpgsql;
 
-select define_function_args('content_item__is_index_page','item_id,folder_id');
 
-select define_function_args('content_item__is_index_page','item_id,folder_id');
 
-
-
+select define_function_args('content_item__is_index_page','item_id,folder_id');
 --
 -- procedure content_item__is_index_page/2
 --
@@ -2904,10 +2857,8 @@
 END;
 $$ LANGUAGE plpgsql stable;
 
-select define_function_args('content_item__get_parent_folder','item_id');
 
-
-
+select define_function_args('content_item__get_parent_folder','item_id');
 --
 -- procedure content_item__get_parent_folder/1
 --
