Fix invalid type. type="" is valid because of custom reports.

Same for stock.
This commit is contained in:
james 2007-12-20 18:00:30 +00:00
parent a660ea4e3f
commit 87f1452919

View File

@ -63,19 +63,17 @@
if($category) {
$type = $_POST['type'];
if(!array_key_exists($type, $report_options['type']['values'])) {
/* Invalid format, not possible unless someone manually
* changes the POST variable */
echo "Invalid format";
exit;
}
$stock = $_POST['stock'];
if(!array_key_exists($stock, $report_stock)) {
/* Invalid format, not possible unless someone manually
* changes the POST variable */
echo "Invalid stock";
/*
if(!array_key_exists($type, $report_options['type']['values'])) {
echo "Invalid format: type=$type";
exit;
}
if(!array_key_exists($stock, $report_stock)) {
echo "Invalid stock: stock=$stock";
exit;
}
*/
mysql_query("INSERT INTO `reports_committee`
(`id`, `users_id` , `reports_id` , `category` , `comment` , `format` , `stock`)