/** * shn_image_vm_display_image() * This lets us use Sahana's 'stream' functionality to display an image without resorting to * an extra file in /tmp. * Sahana automatically calls this, according to the shn_[stream]_[mod]_[act]() naming convention. */ function shn_image_vm_display_image() { // we're not going through our controller here, so we need to set up the database. shn_vm_load_db(); $img_uuid = $_GET['id']; $size = $_GET['size']; $p = new VMPicture($img_uuid); if ($size == 'thumb') { $p->displayThumb(); } else { $p->display(); } }