forked from science-ation/science-ation
Fix invalid type. type="" is valid because of custom reports.
Same for stock.
This commit is contained in:
parent
a660ea4e3f
commit
87f1452919
@ -63,19 +63,17 @@
|
|||||||
if($category) {
|
if($category) {
|
||||||
|
|
||||||
$type = $_POST['type'];
|
$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'];
|
$stock = $_POST['stock'];
|
||||||
if(!array_key_exists($stock, $report_stock)) {
|
/*
|
||||||
/* Invalid format, not possible unless someone manually
|
if(!array_key_exists($type, $report_options['type']['values'])) {
|
||||||
* changes the POST variable */
|
echo "Invalid format: type=$type";
|
||||||
echo "Invalid stock";
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
if(!array_key_exists($stock, $report_stock)) {
|
||||||
|
echo "Invalid stock: stock=$stock";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
mysql_query("INSERT INTO `reports_committee`
|
mysql_query("INSERT INTO `reports_committee`
|
||||||
(`id`, `users_id` , `reports_id` , `category` , `comment` , `format` , `stock`)
|
(`id`, `users_id` , `reports_id` , `category` , `comment` , `format` , `stock`)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user