function image_gallery_update_1 in Image 7
Same name and namespace in other branches
- 5.2 contrib/image_gallery/image_gallery.install \image_gallery_update_1()
- 5 contrib/image_gallery/image_gallery.install \image_gallery_update_1()
- 6 contrib/image_gallery/image_gallery.install \image_gallery_update_1()
Re-assign image vocabularies to image_gallery module.
File
- contrib/
image_gallery/ image_gallery.install, line 56
Code
function image_gallery_update_1() {
$ret = array();
if ($vid = variable_get('image_nav_vocabulary', '')) {
$args = array(
$vid,
);
$query = "UPDATE {vocabulary} SET module = 'image_gallery' WHERE vid = %d";
_db_query_callback($args, TRUE);
$query = preg_replace_callback(DB_QUERY_REGEXP, '_db_query_callback', $query);
$ret[] = update_sql($query);
}
else {
$ret[] = update_sql("UPDATE {vocabulary} SET module = 'image_gallery' WHERE module = 'image'");
}
return $ret;
}