function biblio_tagged_biblio_export in Bibliography Module 6.2
Same name and namespace in other branches
- 7 modules/endnote/biblio_tagged.module \biblio_tagged_biblio_export()
- 7.2 modules/endnote/biblio_tagged.module \biblio_tagged_biblio_export()
1 string reference to 'biblio_tagged_biblio_export'
- biblio_tagged_menu in modules/
endnote/ biblio_tagged.module
File
- modules/
endnote/ biblio_tagged.module, line 113
Code
function biblio_tagged_biblio_export($nid = null) {
$popup = FALSE;
if ($nid === null && isset($_SESSION['last_biblio_query']) && !empty($_SESSION['last_biblio_query'])) {
$query = $_SESSION['last_biblio_query'];
$params = $_SESSION['last_biblio_query_terms'];
}
elseif (!empty($nid)) {
$query = db_rewrite_sql("SELECT DISTINCT(n.nid) FROM {node} n WHERE n.nid=%d ");
$params[] = $nid;
}
else {
return;
}
$result = db_query($query, $params);
$count = 0;
if (module_exists('popups') && $nid) {
$popup = TRUE;
}
else {
drupal_set_header('Content-type: application/x-endnote-refer');
drupal_set_header('Content-Disposition: filename="Drupal-Biblio.enw"');
}
while ($node = db_fetch_object($result)) {
$node = node_load($node->nid, FALSE, TRUE);
if (variable_get('biblio_hide_bibtex_braces', 0)) {
$node->title = biblio_remove_brace($node->title);
}
_biblio_export_visibility($node);
if (!$popup) {
print _biblio_tagged_export($node);
}
else {
$popup_data .= _biblio_tagged_export($node);
}
}
if ($popup && !empty($popup_data)) {
return '<pre>' . $popup_data . '</pre>';
}
}