function node_gallery_update_6103 in Node Gallery 6.3
Same name and namespace in other branches
- 6 node_gallery.install \node_gallery_update_6103()
- 6.2 node_gallery.install \node_gallery_update_6103()
Implements hook_update_N() Updating the database so we can custom select the number of uploads
File
- ./
node_gallery.install, line 697 - Install, update and uninstall functions for the node_gallery module.
Code
function node_gallery_update_6103() {
$ret = array();
$result = db_query("SELECT * FROM {ng_gallery_config} WHERE 1");
$t = drupal_unpack(db_fetch_object($result));
while ($t = drupal_unpack(db_fetch_object($result))) {
if (!empty($t)) {
$relationship = new gallery_config($t);
$relationship->upload_settings = array(
'number_uploads' => '5',
);
unset($relationship->data);
$relationship
->save();
}
}
return $ret;
}