node_gallery_api_views_handler_item_date.inc in Node Gallery 7
Creates an image date handler for galleries.
File
includes/views/node_gallery_api_views_handler_item_date.incView source
<?php
/**
* @file
* Creates an image date handler for galleries.
*/
class node_gallery_api_views_handler_item_date extends views_handler_field_date {
function query() {
$this
->ensure_my_table();
$sql = "SELECT n.changed FROM {node_gallery_relationship} ng\n LEFT JOIN {node} n on ng.nid = n.nid\n WHERE n.status = 1 AND ng.ngid = node.nid\n ORDER BY changed DESC LIMIT 1";
$this->field_alias = $this->query
->add_field(NULL, "({$sql})", 'item_date');
}
}
Classes
Name | Description |
---|---|
node_gallery_api_views_handler_item_date | @file Creates an image date handler for galleries. |