include_once 'bugs/pear-bugs-utils.php'; $ldesc .= PEAR_Bugs_Utils::spamProtect($note['user_name'], 'text'); } $ldesc .= "\n\n" . str_replace('<br />', '', $dbh->escapeSimple(html_entity_decode($note['note_text']))); $package_version = null; $php_version = 'Irrelevant'; $php_os = 'Irrelevant'; $status = 'Open'; $passwd = null; $reporter_name = $auth_user->name; $sql = "\n INSERT INTO bugdb (\n registered,\n package_name,\n bug_type,\n email,\n handle,\n sdesc,\n ldesc,\n package_version,\n php_version,\n php_os,\n status,\n ts1,\n passwd,\n reporter_name\n ) VALUES (\n ?, ?, ?, ?, ?,\n ?, ?, null, ?, ?,\n ?, NOW(), null, ?\n )\n "; $args = array($registered, $package_name, $bug_type, $email, $handle, $sdesc, $ldesc, $php_version, $php_os, $status, $reporter_name); $dbh->query($sql, $args); // 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');