From a58651555b8ad549783365333fb16330d6f590cb Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 4 Dec 2006 06:42:14 +0000 Subject: [PATCH] r1331: We can now actually save data using the new product selectors --- editreport.php | 8 +++++--- newreport.php | 13 +++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/editreport.php b/editreport.php index dd12c4d..af2ff9b 100644 --- a/editreport.php +++ b/editreport.php @@ -194,11 +194,13 @@ if ($_POST['do'] == 'update') $bugapi->set('severity', $bugsys->in['severity']); $bugapi->set('duplicateof', $bugsys->in['duplicateof']); $bugapi->set('dependency', $dependencies); - $bugapi->set('product', $pcv['product']); - $bugapi->set('component', $pcv['component']); - $bugapi->set('version', $pcv['version']); $bugapi->set('hidden', $bugsys->in['hidden']); + $product = explode(',', $bugsys->in['product']); + $bugapi->set('product', $product[0]); + $bugapi->set('component', $product[1]); + $bugapi->set('version', $product[2]); + if (can_perform('canchangestatus', $bug['product'])) { $bugapi->set('priority', $bugsys->in['priority']); diff --git a/newreport.php b/newreport.php index aee6450..15b04b8 100755 --- a/newreport.php +++ b/newreport.php @@ -36,8 +36,8 @@ require_once('./includes/api_comment.php'); require_once('./includes/class_api_error.php'); APIError(array(new API_Error_Handler($message), 'user_cumulative')); -$bugsys->input_clean('product', TYPE_UINT); -if (!can_perform('cansubmitbugs', $bugsys->in['product'])) +$product = explode(',', $bugsys->in['product']); +if (!can_perform('cansubmitbugs', $product[0])) { $message->error_permission(); } @@ -89,11 +89,12 @@ if ($_POST['do'] == 'insert') // assigned person is not a dev or a valid user $bug->set('assignedto', $bugsys->in['assignedto']); } - - $bug->set('product', $bugsys->in['product']); - $bug->set('component', $bugsys->in['component']); - $bug->set('version', $bugsys->in['version']); + $product = explode(',', $bugsys->in['product']); + $bug->set('product', $product[0]); + $bug->set('component', $product[1]); + $bug->set('version', $product[2]); + $cfields = process_custom_fields(null, $message, true); if (!$message->items) -- 2.43.5