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) {
|
||||
|
||||
$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`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user