Index: openacs-4/packages/photo-album/tcl/photo-album-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/photo-album/tcl/photo-album-procs-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/photo-album/tcl/photo-album-procs-oracle.xql 12 Jun 2003 06:55:45 -0000 1.2 +++ openacs-4/packages/photo-album/tcl/photo-album-procs-oracle.xql 12 Mar 2005 22:13:03 -0000 1.3 @@ -159,7 +159,8 @@ filename => :path, height => :height, width => :width, - context_id => :context_id + context_id => :context_id, + package_id => :package_id ); end; Index: openacs-4/packages/photo-album/tcl/photo-album-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/photo-album/tcl/photo-album-procs-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/photo-album/tcl/photo-album-procs-postgresql.xql 26 Jul 2004 13:07:42 -0000 1.4 +++ openacs-4/packages/photo-album/tcl/photo-album-procs-postgresql.xql 12 Mar 2005 22:13:03 -0000 1.5 @@ -140,7 +140,8 @@ :path, -- path :size, -- file_size :height, -- height - :width -- width + :width, -- width + :package_id ) Index: openacs-4/packages/photo-album/tcl/photo-album-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/photo-album/tcl/photo-album-procs.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/photo-album/tcl/photo-album-procs.tcl 24 Feb 2005 11:02:33 -0000 1.12 +++ openacs-4/packages/photo-album/tcl/photo-album-procs.tcl 12 Mar 2005 22:13:03 -0000 1.13 @@ -758,32 +758,12 @@ width size } { - db_exec_plsql pa_insert_image { - declare - dummy integer; - begin - - dummy := image.new ( - name => :name, - parent_id => :photo_id, - item_id => :item_id, - revision_id => :rev_id, - creation_date => sysdate, - creation_user => :user_id, - creation_ip => :peeraddr, - context_id => :context_id, - title => :title, - description => :description, - mime_type => :mime_type, - relation_tag => :relation, - is_live => :is_live, - path => :path, - height => :height, - width => :width, - file_size => :size - ); - end; + if { [ad_conn isconnected] } { + set package_id [ad_conn package_id] + } else { + set package_id "" } + db_exec_plsql pa_insert_image {} } ad_proc -public pa_load_images {