function uc_cart_enable in Ubercart 5
File
- uc_cart/
uc_cart.module, line 181
Code
function uc_cart_enable() {
if (module_exists('imagecache')) {
$result = db_query("SELECT presetid FROM {imagecache_preset} WHERE presetname = 'cart'");
if (!db_fetch_object($result)) {
$id = db_next_id('{imagecache_preset}_presetid');
db_query("INSERT INTO {imagecache_preset} (presetid, presetname) VALUES (%d, 'cart')", $id);
db_query("INSERT INTO {imagecache_action} (actionid, presetid, weight, data) VALUES (%d, %d, 0, '%s')", db_next_id('{imagecache_action}_actionid'), $id, 'a:4:{s:8:"function";s:5:"scale";s:3:"fit";s:6:"inside";s:5:"width";s:2:"50";s:6:"height";s:2:"50";}');
cache_clear_all('imagecache:presets', 'cache');
}
}
}