Skip to content

Commit

Permalink
Fixed issue #6741: File upload question: Unable to remove uploaded file
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Oct 25, 2012
1 parent 34f2bc6 commit c62d85a
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions application/controllers/UploaderController.php
Expand Up @@ -16,7 +16,16 @@
class UploaderController extends AdminController {
function run($actionID)
{

$surveyid= $_SESSION['LEMsid'];
if (isset($_SESSION['survey_'.$surveyid]['s_lang']))
{
$sLanguage = $_SESSION['survey_'.$surveyid]['s_lang'];
}
else
{
$sLanguage='';
}
$clang = SetSurveyLanguage( $surveyid, $sLanguage);
$uploaddir = Yii::app()->getConfig("uploaddir");
$tempdir = Yii::app()->getConfig("tempdir");

Expand Down Expand Up @@ -80,24 +89,7 @@ function run($actionID)
exit();
}

if (!isset($surveyid))
{
$surveyid=sanitize_int(@$param['sid']);
}
else
{
//This next line ensures that the $surveyid value is never anything but a number.
$surveyid=sanitize_int($surveyid);
}
if (isset($_SESSION['survey_'.$surveyid]['s_lang']))
{
$sLanguage = $_SESSION['survey_'.$surveyid]['s_lang'];
}
else
{
$sLanguage='';
}
$clang = SetSurveyLanguage( $surveyid, $sLanguage);

if(isset($param['mode']) && $param['mode'] == "upload")
{
$clang = Yii::app()->lang;
Expand Down

0 comments on commit c62d85a

Please sign in to comment.