Fix divisions insert check

This commit is contained in:
james 2011-01-28 18:22:18 +00:00
parent cb6796b95d
commit 462427c1b1

View File

@ -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")));
}