Index: openacs-4/packages/fs-portlet/sql/oracle/fs-contents-portlet-mods.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/oracle/fs-contents-portlet-mods.sql,v diff -u -r1.2 -r1.2.6.1 --- openacs-4/packages/fs-portlet/sql/oracle/fs-contents-portlet-mods.sql 4 Dec 2002 09:54:15 -0000 1.2 +++ openacs-4/packages/fs-portlet/sql/oracle/fs-contents-portlet-mods.sql 17 Jun 2004 20:27:21 -0000 1.2.6.1 @@ -10,21 +10,24 @@ for each row begin - for row in (select m.element_id - from portal_element_map m, - portal_element_parameters p - where p.key = 'folder_id' - and p.value = :new.folder_id - and m.element_id = p.element_id - and m.name = 'fs_contents_portlet') loop + if :old.label <> :new.label then - update portal_element_map - set pretty_name = :new.label - where element_id = row.element_id; + for row in (select m.element_id + from portal_element_map m, + portal_element_parameters p + where p.key = 'folder_id' + and p.value = :new.folder_id + and m.element_id = p.element_id + and m.name = 'fs_contents_portlet') loop - end loop; + update portal_element_map + set pretty_name = :new.label + where element_id = row.element_id; + end loop; +end if; + end fs_cont_port_fldr_rnme_tr; / show errors Index: openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-mods.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-mods.sql,v diff -u -r1.2 -r1.2.6.1 --- openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-mods.sql 4 Dec 2002 09:54:15 -0000 1.2 +++ openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-mods.sql 17 Jun 2004 20:27:22 -0000 1.2.6.1 @@ -10,21 +10,24 @@ for each row begin - for row in (select m.element_id - from portal_element_map m, - portal_element_parameters p - where p.key = 'folder_id' - and p.value = :new.folder_id - and m.element_id = p.element_id - and m.name = 'fs_contents_portlet') loop + if :old.label <> :new.label then - update portal_element_map - set pretty_name = :new.label - where element_id = row.element_id; + for row in (select m.element_id + from portal_element_map m, + portal_element_parameters p + where p.key = 'folder_id' + and p.value = :new.folder_id + and m.element_id = p.element_id + and m.name = 'fs_contents_portlet') loop + + update portal_element_map + set pretty_name = :new.label + where element_id = row.element_id; + + end loop; - end loop; +end if; - end fs_cont_port_fldr_rnme_tr; / show errors