Skip to content

Commit

Permalink
Fix Quota check moved to save.php so that it is checked once before d…
Browse files Browse the repository at this point in the history
…ata is saved, this also fixes bug: #04303

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8686 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
David Olivier committed May 5, 2010
1 parent 1d8b695 commit f24d83f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
6 changes: 0 additions & 6 deletions group.php
Expand Up @@ -52,12 +52,6 @@
//CHECK PREGS
$notvalidated=checkpregs($move,$backok);

//CHECK QUOTA
if ($thissurvey['active'] == "Y")
{
check_quota('enforce',$surveyid);
}

//SEE IF THIS GROUP SHOULD DISPLAY
$show_empty_group = false;
if (isset($move) && $_SESSION['step'] != 0 && $move != "movesubmit")
Expand Down
6 changes: 0 additions & 6 deletions question.php
Expand Up @@ -53,12 +53,6 @@
//CHECK PREGS
$notvalidated=checkpregs($move,$backok);

//CHECK QUOTA
if ($thissurvey['active'] == "Y")
{
check_quota('enforce',$surveyid);
}

//SEE IF $surveyid EXISTS ####################################################################
if ($surveyexists <1)
{
Expand Down
4 changes: 3 additions & 1 deletion save.php
Expand Up @@ -111,9 +111,11 @@
$bFinalizeThisAnswer = false;
}

//SAVE if on page with questions or on submit page
// SAVE if on page with questions or on submit page
if (isset($postedfieldnames))
{
check_quota('enforce',$surveyid);

if ($thissurvey['active'] == "Y" && !isset($_SESSION['finished'])) // Only save if active and the survey wasn't already submitted
{
// SAVE DATA TO SURVEY_X RECORD
Expand Down
6 changes: 0 additions & 6 deletions survey.php
Expand Up @@ -36,12 +36,6 @@
//CHECK PREGS
$notvalidated=checkpregs($move);

//CHECK QUOTA
if ($thissurvey['active'] == "Y")
{
check_quota('enforce',$surveyid);
}

//SUBMIT
if ((isset($move) && $move == "movesubmit") && (!isset($notanswered) || !$notanswered) && (!isset($notvalidated) && !$notvalidated))
{
Expand Down

0 comments on commit f24d83f

Please sign in to comment.