function block_upload_update_7101 in Block Upload 7
Moves block settings to single settings array.
File
- ./
block_upload.install, line 30 - Create the first block upload of many or convert it from the single block.
Code
function block_upload_update_7101() {
$blocks_count = variable_get('block_upload_blocks_count', 1);
for ($i = 1; $i <= $blocks_count; $i++) {
$settings = array();
$plupload_status = variable_get('block_upload_' . $i . '_plupload_status', 0);
$plupload_status ? $settings['plupload'] = TRUE : ($settings['plupload'] = FALSE);
variable_set('block_upload_' . $i . '_settings', $settings);
}
}