Skip to content

Commit

Permalink
Dev: #09066 child : use autoload_url for quota
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Jul 5, 2014
1 parent 5350358 commit 2bef7de
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion application/helpers/frontend_helper.php
Expand Up @@ -2000,15 +2000,17 @@ function checkCompletedQuota($surveyid,$return=false)
$sUrl=$event->get('url',$aMatchedQuota['quotals_url']);
$sUrlDescription=$event->get('urldescrip',$aMatchedQuota['quotals_urldescrip']);
$sAction=$event->get('action',$aMatchedQuota['action']);
$sAutoloadUrl=$event->get('autoloadurl',$aMatchedQuota['autoload_url']);

// Doing the acton and show the page
// Doing the action and show the page
if ($sAction == "1" && $sClientToken)
submittokens(true);
// Construct the default message
$sMessage = templatereplace($sMessage,array(),$redata);
$sUrl = passthruReplace($sUrl, $thissurvey);
$sUrl = templatereplace($sUrl,array(),$redata);
$sUrlDescription = templatereplace($sUrlDescription,array(),$redata);

// Construction of default message inside quotamessage class
$quotaMessage = "<div class='quotamessage limesurveycore'>\n";
$quotaMessage.= "\t".$sMessage."\n";
Expand All @@ -2032,6 +2034,12 @@ function checkCompletedQuota($surveyid,$return=false)

// Send page to user and end.
sendCacheHeaders();
if($sAutoloadUrl == 1 && $sUrl != "")
{
if ($sAction == "1")
killSurveySession($surveyid);
header("Location: ".$sUrl);
}
doHeader();
echo templatereplace(file_get_contents($sTemplatePath."/startpage.pstpl"),array(),$redata);
// Better to use completed.pstpl, but some template can need update , leave it for 2.06 #09133
Expand Down

0 comments on commit 2bef7de

Please sign in to comment.