function uc_catalog_image_load in Ubercart 6.2
Same name and namespace in other branches
- 5 uc_catalog/uc_catalog.module \uc_catalog_image_load()
Loads a catalog term's image.
2 calls to uc_catalog_image_load()
- uc_catalog_form_alter in uc_catalog/
uc_catalog.module - Implements hook_form_alter().
- uc_catalog_get_page in uc_catalog/
uc_catalog.module - Loads catalog information for display.
File
- uc_catalog/
uc_catalog.module, line 995 - Ubercart Catalog module.
Code
function uc_catalog_image_load($term) {
if (is_object($term)) {
$tid = $term->tid;
}
elseif (is_array($term)) {
$tid = $term['tid'];
}
else {
$tid = $term;
}
$file = db_fetch_object(db_query("SELECT * FROM {uc_catalog_images} WHERE tid = %d", $tid));
return $file;
}