Index: openacs-4/packages/lorsm/www/delivery/bottom.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/bottom.tcl,v
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- openacs-4/packages/lorsm/www/delivery/bottom.tcl 5 May 2006 17:00:19 -0000 1.1.2.1
+++ openacs-4/packages/lorsm/www/delivery/bottom.tcl 20 Dec 2006 12:25:43 -0000 1.1.2.1.2.1
@@ -30,21 +30,10 @@
set item_list [lorsm::get_item_list $man_id $user_id]
-set last_item_viewed [db_string select_last_item_viewed {
- select ims_item_id
- from views v,
- ims_cp_items i,
- ims_cp_organizations o
- where v.viewer_id = :user_id
- and v.object_id = i.ims_item_id
- and i.org_id = o.org_id
- and o.man_id = :man_id
- order by v.last_viewed desc
- limit 1
-} -default "no_item"]
+set last_item_viewed [db_string select_last_item_viewed {} -default "no_item"]
set first_item_id [lindex $item_list 0]
-set first_item_url ""
+set first_item_url ""
set curr_index [expr [lsearch -exact $item_list $last_item_viewed]]
set prev_item_id [lindex $item_list [expr $curr_index - 1]]