You are here

function theme_views_oai_pmh_identify_body in Views OAI-PMH 7.2

Same name and namespace in other branches
  1. 6.2 theme/views_oai_pmh.theme.inc \theme_views_oai_pmh_identify_body()
  2. 6 theme/views_oai_pmh.theme.inc \theme_views_oai_pmh_identify_body()
  3. 7 theme/views_oai_pmh.theme.inc \theme_views_oai_pmh_identify_body()
1 theme call to theme_views_oai_pmh_identify_body()
views_oai_pmh_plugin_style::render_content in plugins/views_oai_pmh_plugin_style.inc

File

theme/views_oai_pmh.theme.inc, line 183
Theme related functions for processing our output style plugins.

Code

function theme_views_oai_pmh_identify_body($vars) {
  global $base_url;
  $view = $vars['view'];
  $path = $view->display_handler
    ->get_path();
  $datestamp = db_query("SELECT min(changed) FROM {node} ")
    ->fetchField();
  $ident = array(
    'repositoryName' => variable_get('site_name', 'Views OAI'),
    'baseURL' => $base_url . '/' . $path,
    'protocolVersion' => '2.0',
    'adminEmail' => variable_get('site_mail', ini_get('sendmail_from')),
    'earliestDatestamp' => gmstrftime('%Y-%m-%dT%H:%M:%SZ', $datestamp),
    'deletedRecord' => 'no',
    'granularity' => 'YYYY-MM-DDThh:mm:ssZ',
    'compression' => 'gzip',
  );
  return format_xml_elements($ident);
}