- If purging a deleted resource & promoting accessories, restore accessories too

- Remove debug
This commit is contained in:
Nathan Gray 2013-01-14 15:38:33 +00:00
parent 16cf3a642e
commit 207e94e8b4

View File

@ -315,7 +315,7 @@ class resources_ui
$checked[] = $resource['res_id']; $checked[] = $resource['res_id'];
} }
} }
echo __METHOD__."('$action', ".array2string($checked).', '.array2string($use_all).",,, '$session_name')"; //echo __METHOD__."('$action', ".array2string($checked).', '.array2string($use_all).",,, '$session_name')";
// Dialogs to get options // Dialogs to get options
list($action, $settings) = explode('_', $action, 2); list($action, $settings) = explode('_', $action, 2);
@ -401,6 +401,8 @@ class resources_ui
{ {
$acc = $this->bo->read($acc_id); $acc = $this->bo->read($acc_id);
$acc['accessory_of'] = -1; $acc['accessory_of'] = -1;
// Restore them if deleted
$acc['deleted'] = null;
$this->bo->save($acc); $this->bo->save($acc);
$promoted_accessories++; $promoted_accessories++;