From 207e94e8b4ead38718a1376786403a14d8233120 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 14 Jan 2013 15:38:33 +0000 Subject: [PATCH] - If purging a deleted resource & promoting accessories, restore accessories too - Remove debug --- resources/inc/class.resources_ui.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/inc/class.resources_ui.inc.php b/resources/inc/class.resources_ui.inc.php index c324aecc2f..bc365aa5cb 100755 --- a/resources/inc/class.resources_ui.inc.php +++ b/resources/inc/class.resources_ui.inc.php @@ -315,7 +315,7 @@ class resources_ui $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 list($action, $settings) = explode('_', $action, 2); @@ -401,6 +401,8 @@ class resources_ui { $acc = $this->bo->read($acc_id); $acc['accessory_of'] = -1; + // Restore them if deleted + $acc['deleted'] = null; $this->bo->save($acc); $promoted_accessories++;