Index: openacs-4/packages/bookshelf/www/book-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookshelf/www/book-chunk.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/bookshelf/www/book-chunk.tcl 21 Jan 2003 14:54:51 -0000 1.3 +++ openacs-4/packages/bookshelf/www/book-chunk.tcl 30 Apr 2003 07:24:30 -0000 1.4 @@ -5,15 +5,23 @@ set write_p [ad_permission_p $package_id write] set book_no $book(book_no) -set book(url) [bookshelf::amazon::get_book_url $book(isbn)] +if { ![empty_string_p $book(isbn)] } { -set book(image_url) [bookshelf::amazon::get_image_url $book(isbn)] + set book(url) [bookshelf::amazon::get_book_url $book(isbn)] -bookshelf::amazon::get_image_info -array amazon_info $book(isbn) + set book(image_url) [bookshelf::amazon::get_image_url $book(isbn)] -set book(image_width) $amazon_info(image_width) -set book(image_height) $amazon_info(image_height) + bookshelf::amazon::get_image_info -array amazon_info $book(isbn) + set book(image_width) $amazon_info(image_width) + set book(image_height) $amazon_info(image_height) +} else { + set book(url) {} + set book(image_url) {} + set book(image_width) {} + set book(image_height) {} +} + set perma_url "[ad_url][ad_conn package_url]book-view?[export_vars { book_no }]" set google_url "http://www.google.com/search?[export_vars { {q $book(book_title) } }]"