function biblio_dump_db_data_for_pot in Bibliography Module 6
Same name and namespace in other branches
- 6.2 includes/biblio.import.export.inc \biblio_dump_db_data_for_pot()
- 7 includes/biblio.import.export.inc \biblio_dump_db_data_for_pot()
- 7.2 includes/biblio.import.export.inc \biblio_dump_db_data_for_pot()
1 call to biblio_dump_db_data_for_pot()
1 string reference to 'biblio_dump_db_data_for_pot'
- biblio_menu in ./
biblio.module - Implementation of hook_menu().
File
- ./
biblio.import.export.inc, line 1344 - Functions that are used to import and export biblio data.
Code
function biblio_dump_db_data_for_pot() {
$query = "SELECT name, description FROM {biblio_types} ";
$result = db_query($query);
$strings = array();
while ($type = db_fetch_object($result)) {
$strings[] = $type->name;
if (!empty($type->description)) {
$strings[] = $type->description;
}
}
$query = "SELECT title, hint FROM {biblio_field_type_data} ";
$result = db_query($query);
while ($type_data = db_fetch_object($result)) {
$strings[] = $type_data->title;
if (!empty($type_data->hint)) {
$strings[] = $type_data->hint;
}
}
$query = "SELECT title, hint FROM {biblio_contributor_type_data} ";
$result = db_query($query);
while ($type_data = db_fetch_object($result)) {
$strings[] = $type_data->title;
if (!empty($type_data->hint)) {
$type_data->hint;
}
}
$strings = array_unique($strings);
foreach ($strings as $string) {
$output .= "t(\"{$string}\"\\);\n";
}
drupal_set_header('Content-Type: text/plain; charset=utf-8');
drupal_set_header('Content-Disposition: attachment; filename=biblio_db_values.pot');
print $output;
}