function biblio_export in Bibliography Module 6
Same name and namespace in other branches
- 6.2 includes/biblio.import.export.inc \biblio_export()
- 7 includes/biblio.import.export.inc \biblio_export()
- 7.2 includes/biblio.import.export.inc \biblio_export()
Export nodes in a given file format.
Parameters
$format: The file format to export the nodes in (tagged, XML, bibTEX)
$nid: If not NULL, then export only the given nodeid, else we will use the session variable which holds the most recent query. If neither $nid or the session variable are set, then nothing is exported
$version: The version of EndNote XML to use. There is one format for ver. 1-7 and a different format for versions 8 and greater.
Return value
none
1 string reference to 'biblio_export'
- biblio_menu in ./
biblio.module - Implementation of hook_menu().
File
- ./
biblio.import.export.inc, line 481 - Functions that are used to import and export biblio data.
Code
function biblio_export($format = "tagged", $nid = null, $popup = false, $version = 8) {
$params = array();
$nids = array();
if ($nid === null && isset($_SESSION['last_biblio_query']) && !empty($_SESSION['last_biblio_query'])) {
$query = $_SESSION['last_biblio_query'];
$params = $_SESSION['last_biblio_query_terms'];
$result = db_query($query, $params);
while ($node = db_fetch_object($result)) {
$nids[] = $node->nid;
}
}
elseif (!empty($nid)) {
$nids[] = $nid;
}
else {
return;
}
return _biblio_export($nids, $format, $popup, $version);
}