view-image.tcl
Views an attached image
- Location:
- /packages/general-comments/www/view-image.tcl
- Authors:
- Phong Nguyen <phong@arsdigita.com>
- Pascal Scheffers <pascal@scheffers.net>
- Created:
- 2000-10-12
- CVS ID:
$Id: view-image.tcl,v 1.6 2017/08/07 23:48:12 gustafn Exp $
Related Files
- packages/general-comments/www/view-image.xql
- packages/general-comments/www/view-image.tcl
- packages/general-comments/www/view-image.adp
[ hide source ] | [ make this the default ]
File Contents
# /packages/general-comments/www/view-image.tcl ad_page_contract { Views an attached image @author Phong Nguyen (phong@arsdigita.com) @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id: view-image.tcl,v 1.6 2017/08/07 23:48:12 gustafn Exp $ } { image_id:naturalnum,notnull { return_url:localurl {} } } -properties { page_title:onevalue context:onevalue return_url:onevalue image_id:onevalue width:onevalue height:onevalue } # check that user can view the image permission::require_permission -object_id $image_id -privilege read # get the image attributes db_1row get_image { select i.name, r.title, m.width, m.height from cr_items i, cr_revisions r, images m where i.item_id = :image_id and r.revision_id = i.live_revision and r.revision_id = m.image_id } set page_title "[_ general-comments.Image_attachment]" set context [list [list "$return_url" "[_ general-comments.Go_back_to_comment]"] "[_ general-comments.Image_attachment]"] ad_return_template # Local variables: # mode: tcl # tcl-indent-level: 4 # indent-tabs-mode: nil # End: