function uc_catalog_update_6 in Ubercart 5
File
- uc_catalog/
uc_catalog.install, line 142
Code
function uc_catalog_update_6() {
$ret = array();
if (module_exists('imagecache')) {
$preset_id = db_next_id('{imagecache_preset}_presetid');
$action_id = db_next_id('{imagecache_action}_actionid');
db_query("INSERT INTO {imagecache_preset} (presetid, presetname) VALUES (%d, 'uc_catalog')", $preset_id);
db_query("INSERT INTO {imagecache_action} (actionid, presetid, weight, data) VALUES (%d, %d, 0, '%s')", $action_id, $preset_id, 'a:4:{s:8:"function";s:5:"scale";s:3:"fit";s:6:"inside";s:5:"width";s:2:"96";s:6:"height";s:2:"96";}');
cache_clear_all('imagecache:presets', 'cache');
$ret[] = array(
'success' => TRUE,
'query' => "INSERT INTO {imagecache_preset} (presetid, presetname) VALUES (" . $preset_id . ", 'uc_catalog')",
);
$ret[] = array(
'success' => TRUE,
'query' => "INSERT INTO {imagecache_action} (actionid, presetid, weight, data) VALUES (" . $action_id . ", " . $preset_id . ", 0, '" . 'a:4:{s:8:"function";s:5:"scale";s:3:"fit";s:6:"inside";s:5:"width";s:2:"96";s:6:"height";s:2:"96";}' . "')",
);
}
return $ret;
}