function photos_page_album in Album Photos 6.2
Same name and namespace in other branches
- 7.3 inc/photos.page.inc \photos_page_album()
1 string reference to 'photos_page_album'
- photos_menu in ./
photos.module
File
- inc/
photos.page.inc, line 15
Code
function photos_page_album($ac = false) {
if ($ac->uid) {
$result = pager_query(db_rewrite_sql('SELECT n.nid FROM {node} n INNER JOIN {x_album} p ON n.nid = p.pid WHERE n.uid = %d ORDER BY n.nid DESC'), 10, 0, NULL, $ac->uid);
_photos_breadcrumb(array(
l(t('Albums'), 'photos/album'),
));
}
else {
$result = pager_query(db_rewrite_sql('SELECT n.nid FROM {node} n INNER JOIN {x_album} p ON n.nid = p.pid ORDER BY n.nid DESC'), 10, 0, NULL, $ac->uid);
}
while ($node = db_fetch_object($result)) {
$output .= node_view(node_load($node->nid), 1);
}
if ($output) {
$output .= theme('pager', NULL, 10);
}
else {
$output .= t('@name has not yet create an album', array(
'@name' => $ac->name,
));
}
return $output;
}