Skip to content

Commit

Permalink
Fixed issue 04610 : The user can now set the value to 0 and other val…
Browse files Browse the repository at this point in the history
…idation checks have been put in place

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@9236 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Aniessh Sethh committed Oct 13, 2010
1 parent 2a22fcd commit b8f157f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions admin/quota.php
Expand Up @@ -220,10 +220,12 @@ function getQuotaAnswers($qid,$surveyid,$quota_id)
if (!isset($_POST['autoload_url']) || empty($_POST['autoload_url'])) {$_POST['autoload_url']=0;}
if($subaction == "insertquota")
{
if(!isset($_POST['quota_limit']) || $_POST['quota_limit'] < 1)
{
$_POST['quota_limit'] = 1;
if(!isset($_POST['quota_limit']) || $_POST['quota_limit'] < 0 || empty($_POST['quota_limit']) || !is_numeric($_POST['quota_limit']))
{
$_POST['quota_limit'] = 0;

}

array_walk( $_POST, 'db_quote', true);

$query = "INSERT INTO ".db_table_name('quota')." (sid,name,qlimit,action,autoload_url)
Expand Down

0 comments on commit b8f157f

Please sign in to comment.