atom_user_blog_feed($uid)contributions/atom/atom.module, line 155
<?php
function atom_user_blog_feed($uid) {
if (strpos(arg(4), 'atom') === 0 || strpos(arg(4), 'feed') === 0) {
die(drupal_not_found());
}
$user_result = db_query_range("SELECT u.name FROM {users} u WHERE u.uid = %d", $uid, 0, 1);
if (!$user = db_result($user_result)) {
return t('User does not exist.');
}
$nodes = db_query_range("SELECT n.nid FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = '1' ORDER BY n.created DESC", $uid, 0, variable_get('atom_feed_entries', 15));
$feed_info = array();
$feed_info['title'] = sprintf(t("%s's blog"), $user);
$feed_info['subtitle'] = '';
$feed_info['html_url'] = url("blog/$uid", array('absolute' => TRUE));
$feed_info['atom_url'] = url("blog/$uid/atom/feed", array('absolute' => TRUE));
_atom_print_feed($nodes, $feed_info);
}
?>