function biblio_admin_orphans_form in Bibliography Module 6
Same name and namespace in other branches
- 6.2 includes/biblio.admin.inc \biblio_admin_orphans_form()
- 7 includes/biblio.admin.inc \biblio_admin_orphans_form()
- 7.2 includes/biblio.admin.inc \biblio_admin_orphans_form()
1 string reference to 'biblio_admin_orphans_form'
- biblio_menu in ./
biblio.module - Implementation of hook_menu().
File
- ./
biblio.admin.inc, line 1876
Code
function biblio_admin_orphans_form($form_state) {
$base = variable_get('biblio_base', 'biblio');
$result = pager_query('SELECT distinct d.cid cid, name, affiliation
FROM {biblio_contributor_data} d
LEFT JOIN {biblio_contributor} c ON (d.cid=c.cid)
WHERE c.cid IS NULL', 50);
$authors = array();
while ($author = db_fetch_object($result)) {
$authors[$author->cid] = '';
$form['name'][$author->cid] = array(
'#value' => l($author->name, $base . '/authors/' . $author->cid . '/edit'),
);
$form['affiliation'][$author->cid] = array(
'#value' => check_plain($author->affiliation),
);
}
$form['authors'] = array(
'#type' => 'checkboxes',
'#options' => $authors,
);
$form['pager'] = array(
'#value' => theme('pager', NULL, 50, 0),
);
$form['#theme'] = 'biblio_admin_orphans_form';
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Delete'),
'#disabled' => !count($authors),
'#submit' => array(
'biblio_admin_orphans_form_submit',
),
);
return $form;
}