function uc_product_update_6004 in Ubercart 6.2
Handles the image widget upgrade.
File
- uc_product/
uc_product.install, line 300 - Install, update and uninstall functions for the uc_product module.
Code
function uc_product_update_6004() {
$ret = array();
if (!variable_get('uc_product_image_widget', NULL)) {
if (module_exists('thickbox')) {
variable_set('uc_product_image_widget', 'thickbox');
}
elseif (module_exists('lightbox2')) {
variable_set('uc_product_image_widget', 'lightbox2');
}
$ret[] = array(
'success' => TRUE,
variable_get('uc_product_image_widget', 'No widget') . ' was set as the current image widget',
);
}
return $ret;
}