You are here

function uc_attribute_bulk_update_flush_all in Ubercart 6.2

Form submission handler for uc_attribute_bulk_update_form().

See also

uc_attribute_bulk_update_form()

1 string reference to 'uc_attribute_bulk_update_flush_all'
uc_attribute_bulk_update_form in uc_attribute/uc_attribute.admin.inc
Form builder for bulk product updates.

File

uc_attribute/uc_attribute.admin.inc, line 298
Attribute administration menu items.

Code

function uc_attribute_bulk_update_flush_all($form, &$form_state) {
  $result = db_query("SELECT nid FROM {node} WHERE type = '%s'", $form_state['values']['node_type']);
  while ($item = db_fetch_object($result)) {
    $node = node_load($item->nid);
    uc_attribute_node_reset($node);
  }
  drupal_set_message(t("Bulk update completed successfully on all products in this class."));
}