Commit 6d3740d7 authored by pwolanin's avatar pwolanin

#829920 by YesCT, mieg, and pwolanin check for tags existing, avoid dividing by zero

parent 99c88e0d
......@@ -147,8 +147,13 @@ function filefield_meta_update_6100(&$context) {
$context['sandbox']['progress'] = 0;
$context['sandbox']['total'] = db_result(db_query("SELECT COUNT(*) FROM {files} f INNER JOIN {filefield_meta} fm ON f.fid = fm.fid WHERE fm.audio_format <> ''"));
$context['sandbox']['current_fid'] = 0;
db_add_field($ret, 'filefield_meta', 'tags', array('type' => 'text'));
if (!db_column_exists('filefield_meta', 'tags')) {
db_add_field($ret, 'filefield_meta', 'tags', array('type' => 'text'));
}
// We are done if there are none to update.
if ($context['sandbox']['total'] == 0) {
return $ret;
}
}
// Select and process 200 files at a time.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment