Resources: Allow 0 quantity & usable

This commit is contained in:
nathangray 2021-03-24 15:11:57 -06:00
parent 1b184c11c8
commit 98697031ab

View File

@ -517,8 +517,11 @@ class resources_ui
$content['picture_original'] = $content['picture_src'] == 'own_src'?
'webdav.php/apps/resources/'.$content['res_id'].'/.picture.jpg': $this->bo->get_picture($content['res_id'],true);
if(!$content['res_id'])
{
$content['quantity'] = $content['quantity'] ? $content['quantity'] : 1;
$content['useable'] = $content['useable'] ? $content['useable'] : 1;
}
$content['accessory_of'] = $content['accessory_of'] ? $content['accessory_of'] : $accessory_of;
if($content['res_id'] && $content['accessory_of'] == -1)