// TODO: add error handling $id = mysqli_insert_id($dbh->connection); $manualNotes->deleteSingleComment($noteId); // TODO: add error handling $emailInfos = array('reporter_name' => $reporter_name, 'email' => $auth_user->email, 'id' => $id, 'php_os' => $php_os, 'package_version' => $package_version, 'php_version' => $php_version, 'package_name' => $package_name, 'bug_type' => $bug_type, 'ldesc' => $ldesc, 'sdesc' => $sdesc); require 'bugs/pear-bug-accountrequest.php'; $pba = new PEAR_Bug_AccountRequest(); $pba->sendBugEmail($emailInfos); include dirname(__FILE__) . '/index.php'; exit; } break; case 'updateapproved': if (isset($_POST['noteIds']) && is_array($_POST['noteIds'])) { if (isset($_POST['pending'])) { $notes = $manualNotes->updateCommentList($_POST['noteIds'], 'pending'); } elseif (isset($_POST['delete'])) { $notes = $manualNotes->updateCommentList($_POST['noteIds'], 'no'); } else { $notes = PEAR::raiseError('Neither delete nor approve was selected'); } if (PEAR::isError($notes)) { $error = 'Error while making the note pending, contact webmaster'; } else { $message = 'Comment(s) successfully '; $message .= isset($_POST['pending']) ? 'made pending' : 'deleted'; } $_GET = $_POST; $_GET['status'] = 'approved'; include dirname(__FILE__) . '/index.php'; exit;