forked from science-ation/science-ation
Fix divisions insert check
This commit is contained in:
parent
cb6796b95d
commit
462427c1b1
@ -77,9 +77,8 @@ if($_GET['action']=="edit" || $_GET['action']=="new") {
|
||||
}
|
||||
|
||||
if($_POST['action']=="new") {
|
||||
if($_POST['id'] && $_POST['division'])
|
||||
{
|
||||
$q=mysql_query("SELECT id FROM projectdivisions WHERE id='".$_POST['id']."' AND conferences_i='".$conference['id']."'");
|
||||
if($_POST['id'] && $_POST['division']) {
|
||||
$q=mysql_query("SELECT id FROM projectdivisions WHERE id='".intval($_POST['id'])."' AND conferences_id='".$conference['id']."'");
|
||||
if(mysql_num_rows($q)) {
|
||||
echo error(i18n("Division ID %1 already exists",array($_POST['id']),array("division ID")));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user