From 462427c1b1ce51ea0e5bf11231f5e700c1322f74 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 28 Jan 2011 18:22:18 +0000 Subject: [PATCH] Fix divisions insert check --- config/divisions.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/divisions.php b/config/divisions.php index 23863f1..c7e7e5b 100644 --- a/config/divisions.php +++ b/config/divisions.php @@ -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"))); }