function nodeorder_admin_display_form_submit in Node Order 6
Same name and namespace in other branches
- 7 includes/nodeorder.admin.inc \nodeorder_admin_display_form_submit()
Process main blocks administration form submission.
File
- ./
nodeorder.admin.inc, line 88 - Admin page callbacks for the nodeorder module.
Code
function nodeorder_admin_display_form_submit($form, &$form_state) {
$sql = "UPDATE {term_node} SET weight_in_tid = %d WHERE tid = %d AND nid = %d";
$tid = -1;
foreach ($form_state['values'] as $node) {
// Only take form elements that are blocks.
if (is_array($node) && array_key_exists('tid', $node)) {
db_query($sql, $node['weight'], $node['tid'], $node['nid']);
$tid = $node['tid'];
}
}
drupal_set_message(t('The node orders have been updated.'));
cache_clear_all();
return;
}