You are here

function hosting_queues_configure_submit in Hosting 5

Same name and namespace in other branches
  1. 6.2 hosting.module \hosting_queues_configure_submit()
  2. 7.4 hosting.module \hosting_queues_configure_submit()
  3. 7.3 hosting.module \hosting_queues_configure_submit()

File

./hosting.module, line 597
Hosting module

Code

function hosting_queues_configure_submit($form_id, $values) {
  foreach (hosting_get_queues() as $queue => $info) {
    if ($values[$queue]) {
      variable_set("hosting_queue_" . $queue . "_enabled", $values[$queue]['enabled']);
      variable_set("hosting_queue_" . $queue . "_frequency", $values[$queue]['frequency']['ticks'] * $values[$queue]['frequency']['unit']);
      if ($info['type'] == 'serial') {
        variable_set("hosting_queue_" . $queue . "_items", $values[$queue]['frequency']['items']);
      }
    }
  }
}