function template_preprocess_views_view_views_atom_delete in Views Atom 7
Same name and namespace in other branches
- 6 theme/views_atom.theme.inc \template_preprocess_views_view_views_atom_delete()
File
- ./
views_atom.theme.inc, line 64
Code
function template_preprocess_views_view_views_atom_delete(&$vars) {
global $user;
// Inherit the base processing for all atom feeds.
template_preprocess_views_view_views_atom($vars);
$items = array();
$now = date('c');
$vars['updated'] = $now;
$vars['items'] = array();
$guid_options = isset($vars['view']->style_options['guid']) ? $vars['view']->style_options['guid'] : array();
// Now process the rows into deletion information.
foreach ($vars['rows'] as $i => $row) {
$item = array(
'guid' => views_atom_guid('node', $row->nid, $guid_options),
'when' => $now,
'by' => array(
'name' => '',
'email' => '',
),
);
if ($user->uid) {
$item['by']['name'] = $user->name;
$item['by']['email'] = $user->mail;
}
$vars['items'][] = $item;
}
// Set Headers
//drupal_set_header('Content-Type: text/plain; charset=utf-8');
}