function uc_product_update in Ubercart 7.3
Same name and namespace in other branches
- 5 uc_product/uc_product.module \uc_product_update()
- 6.2 uc_product/uc_product.module \uc_product_update()
Implements hook_update().
File
- uc_product/
uc_product.module, line 550 - The product module for Ubercart.
Code
function uc_product_update($node) {
if (isset($node->dim_length)) {
$node->length = $node->dim_length;
}
if (isset($node->dim_width)) {
$node->width = $node->dim_width;
}
if (isset($node->dim_height)) {
$node->height = $node->dim_height;
}
if (!empty($node->revision)) {
drupal_write_record('uc_products', $node);
}
else {
drupal_write_record('uc_products', $node, 'vid');
}
}