function node_gallery_api_browse_items in Node Gallery 7
Redirect to first item in the gallery.
Parameters
$gallery:
1 string reference to 'node_gallery_api_browse_items'
- node_gallery_api_menu in ./
node_gallery_api.module - Implements hook_menu().
File
- ./
node_gallery_api.pages.inc, line 12 - Node Gallery module.
Code
function node_gallery_api_browse_items($gallery) {
$first_item = node_gallery_api_get_first_item($gallery->nid);
$path = 'node/';
if (is_numeric($first_item)) {
$path .= $first_item;
// Set our pretty path.
$path = drupal_get_path_alias($path);
}
drupal_goto($path);
}