function biblio_locale_refresh_types in Bibliography Module 6.2
Same name and namespace in other branches
- 6 biblio.module \biblio_locale_refresh_types()
- 7 biblio.module \biblio_locale_refresh_types()
- 7.2 biblio.module \biblio_locale_refresh_types()
Refreshes all publication type strings.
Parameters
integer $tid: (optional) Biblio publication type ID whose field strings are to be refreshed. If not specified, strings for all fields will be refreshed. The default value is NULL.
3 calls to biblio_locale_refresh_types()
- biblio_admin_types_add_form_submit in includes/
biblio.admin.inc - biblio_admin_types_edit_form_submit in includes/
biblio.admin.inc - biblio_locale in ./
biblio.module - Implements hook_locale().
File
- ./
biblio.module, line 200 - Main file for Drupal module biblio.
Code
function biblio_locale_refresh_types($tid = NULL) {
if (module_exists('i18nstrings')) {
if (isset($tid)) {
$result = db_query('SELECT * FROM {biblio_types} WHERE tid = %d', $tid);
}
else {
$result = db_query('SELECT * FROM {biblio_types} WHERE tid > 0');
}
while ($row = db_fetch_array($result)) {
tt("biblio:type:{$row['tid']}:name", $row['name'], NULL, TRUE);
tt("biblio:type:{$row['tid']}:description", $row['description'], NULL, TRUE);
}
}
}