//:S addon deletation failed! and we have no clue.... bummer die('{"status": "0", "data": "' . $lang['dashboard_err_14'] . '"}'); } } else { //throw error if the author is different than the submitter itself die('{"status": "0", "data": "' . $lang['dashboard_err_12'] . '"}'); } } //Soft delete won't delete it, but put it in to be deleted list, it will be deleted whenever the delete script executes! if ($_POST['modify_type'] == "soft_delete") { //You can not soft delete an addon that is already soft deleted if ($dashboard->getAddonStatus($_POST['record_id']) == "3") { die('{"status": "0", "data": "' . $lang['dashboard_msg_9'] . '"}'); } //Mod/Admin/addon author will be able to soft delete and addon if ($dashboard->verifyAuthor($mb['user']['id'], $_POST['record_id']) || $mb['user']['can_mod']) { if ($dashboard->updateAddonStatus($_POST['record_id'], "3", $mb['user']['id'])) { //@todo: now that the item is deleted, check if it is added to mail queue, if true remove it. exit(' { "status": "1", "data": "' . $lang['dashboard_msg_8'] . '", "callback_function": "remove_addon_record" } '); } else { //:S addon deletation failed! and we have no clue.... bummer die('{"status": "0", "data": "' . $lang['dashboard_err_14'] . '"}'); } } else { //throw error if the author is different than the submitter itself
* * @Contributors: * Created by AvikB for noncommercial MusicBee project. * Spelling mistakes and fixes from community members. * */ $no_guests = true; //kick off the guests require_once $_SERVER['DOCUMENT_ROOT'] . '/functions.php'; require_once $link['root'] . 'classes/Dashboard.php'; require_once $link['root'] . 'classes/Addon.php'; //check if edit GET request is made, if not we don't want UNDEFINED ERROR to pop up! so define the variable if (isset($_GET['view'])) { if ($_GET['view'] == "update" && isset($_GET['id'])) { $dashboard = new Dashboard(); $is_author = $dashboard->verifyAuthor($user_info['id'], $_GET['id']); //verify if the author can modify it.... or if user is mod/admin allow if (!$is_author && !$mb['user']['can_mod']) { ?> <div class="main_content_wrapper col_2_1"> <div class="sub_content_wrapper"> <div class="box_content"> <span class="show_info info_red custom"> <h3><?php echo $lang['dashboard_err_18']; ?> </h3> </span> <p class="info_text"> <?php echo $lang['dashboard_err_12'];