function node_gallery_update_6103 in Node Gallery 6
Same name and namespace in other branches
- 6.3 node_gallery.install \node_gallery_update_6103()
- 6.2 node_gallery.install \node_gallery_update_6103()
Implementation of hook_update_N() Updating the database so we can custom select the number of uploads
File
- ./
node_gallery.install, line 361 - Node gallery install file.
Code
function node_gallery_update_6103() {
$ret = array();
$result = db_query("SELECT * FROM {ng_gallery_config} WHERE 1");
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;
}