Index: openacs-4/packages/file-storage/sql/oracle/upgrade/upgrade-5.1.0a2-5.1.0a3.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/oracle/upgrade/upgrade-5.1.0a2-5.1.0a3.sql,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/file-storage/sql/oracle/upgrade/upgrade-5.1.0a2-5.1.0a3.sql	29 Jun 2004 10:18:23 -0000	1.2
+++ openacs-4/packages/file-storage/sql/oracle/upgrade/upgrade-5.1.0a2-5.1.0a3.sql	19 Mar 2006 22:26:40 -0000	1.2.2.1
@@ -450,9 +450,10 @@
                 from cr_symlinks
                 where symlink_id = get_title.item_id;
             else
-                select name into v_title
-                from cr_items
-                where item_id = get_title.item_id;
+		select crr.title into v_title
+		from cr_revisions crr, cr_items cri
+		where crr.revision_id=cri.live_revision
+		and cri.item_id=get_title.item_id;
             end if;
         end if;
 
