function asset_update_4 in Asset 5
Give directories their own asset type.
File
- ./
asset.install, line 122
Code
function asset_update_4() {
$ret[] = update_sql("UPDATE {asset} SET type='directory' WHERE type='local' AND extension=''");
$dir = 'PUBLIC';
if (asset_check_directory($dir, FILE_CREATE_DIRECTORY)) {
drupal_set_message('Created PUBLIC asset directory');
db_query("UPDATE {asset} SET status=1 WHERE type='directory' AND dirname='' AND filename='PUBLIC'");
}
return $ret;
}