From 4b0d7dc22c7879113b7bb0603645f43e8f76e7d1 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 3 Dec 2005 04:52:53 +0000 Subject: [PATCH] r611: Remove product.shortname --- admin/product.php | 19 +++++++++---------- docs/schema_changes.sql | 1 + 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/admin/product.php b/admin/product.php index a0bfb57..f99c132 100755 --- a/admin/product.php +++ b/admin/product.php @@ -193,17 +193,18 @@ if ($_REQUEST['do'] == 'deleteproduct') if ($_REQUEST['do'] == 'insertproduct') { - if (empty($bugsys->in['shortname']) OR empty($bugsys->in['title'])) + if (empty($bugsys->in['title'])) { - $admin->error($lang->string('Please go back and fill in both fields.')); + $admin->error($lang->string('Please go back and fill in the title field.')); } $db->query(" INSERT INTO " . TABLE_PREFIX . "product - (shortname, title, componentmother, description, displayorder) + (title, componentmother, description, displayorder) VALUES - ('" . $bugsys->in['shortname'] . "', '" . $bugsys->in['title'] . "', - " . intval($bugsys->in['componentmother']) . ", '" . $bugsys->in['description'] . "', " . intval($bugsys->in['displayorder']) . ")" + ('" . $bugsys->in['title'] . "', " . intval($bugsys->in['componentmother']) . ", + '" . $bugsys->in['description'] . "', " . intval($bugsys->in['displayorder']) . " + )" ); build_products(); @@ -220,7 +221,6 @@ if ($_REQUEST['do'] == 'addproduct') $admin->form_hidden_field('componentmother', intval($bugsys->in['productid'])); $admin->table_start(); $admin->table_head($lang->string('Add Product')); - $admin->row_input($lang->string('Short Name
The name that can be used to submit email reports. This should be unique.
'), 'shortname'); $admin->row_input($lang->string('Title'), 'title'); $admin->row_textarea($lang->string('Description
A short description of this product.
'), 'description'); $admin->row_input($lang->string('Display Order
The order in which the products are displayed.
'), 'displayorder'); @@ -235,9 +235,9 @@ if ($_REQUEST['do'] == 'addproduct') if ($_REQUEST['do'] == 'updateproduct') { - if (empty($bugsys->in['shortname']) OR empty($bugsys->in['title'])) + if (empty($bugsys->in['title'])) { - $admin->error($lang->string('Please go back and fill in both fields.')); + $admin->error($lang->string('Please go back and fill in the title field.')); } if (empty($bugsys->in['productid'])) @@ -245,7 +245,7 @@ if ($_REQUEST['do'] == 'updateproduct') $admin->error($lang->getlex('error_invalid_id')); } - $db->query("UPDATE " . TABLE_PREFIX . "product SET title = '" . $bugsys->in['title'] . "', shortname = '" . $bugsys->in['shortname'] . "', description = '" . $bugsys->in['description'] . "', displayorder = " . intval($bugsys->in['displayorder']) . " WHERE productid = " . intval($bugsys->in['productid'])); + $db->query("UPDATE " . TABLE_PREFIX . "product SET title = '" . $bugsys->in['title'] . "', description = '" . $bugsys->in['description'] . "', displayorder = " . intval($bugsys->in['displayorder']) . " WHERE productid = " . intval($bugsys->in['productid'])); build_products(); $admin->redirect('product.php?do=modify'); @@ -268,7 +268,6 @@ if ($_REQUEST['do'] == 'editproduct') $admin->table_start(); $admin->table_head(sprintf($lang->string('Edit Product - %1$s'), $product['title'])); $admin->row_input($lang->string('Title'), 'title', $product['title']); - $admin->row_input($lang->string('Short Name
The name that can be used to submit email reports. This should be unique.
'), 'shortname', $product['shortname']); $admin->row_textarea($lang->string('Description
A short description of this product.
'), 'description', $product['description']); $admin->row_input($lang->string('Display Order
The order in which the products are displayed.
'), 'displayorder', $product['displayorder']); $admin->row_submit(); diff --git a/docs/schema_changes.sql b/docs/schema_changes.sql index 9de1d44..c168e1a 100644 --- a/docs/schema_changes.sql +++ b/docs/schema_changes.sql @@ -1,2 +1,3 @@ ## SVN $Id$ +ALTER TABLE `product` DROP `componentmother`; \ No newline at end of file -- 2.43.5