You are here

function node_limit_list_limits_submit in Node Limit 7

Same name and namespace in other branches
  1. 8 old/node_limit.module \node_limit_list_limits_submit()
  2. 6 node_limit.module \node_limit_list_limits_submit()

Save the module weights.

File

./node_limit.module, line 412

Code

function node_limit_list_limits_submit($form_id, &$form_state) {
  foreach ($form_state['values']['limits'] as $lid => $info) {
    $query = db_update('node_limit')
      ->fields(array(
      'weight' => $info['weight'],
    ))
      ->condition('lid', $lid)
      ->execute();
  }
  drupal_set_message(t('Limits saved!'));
}