Skip to content

Commit

Permalink
Clean up the upload controller.
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@11776 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Aaron Schmitz committed Dec 27, 2011
1 parent dcab16f commit 73437a7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 312 deletions.
300 changes: 0 additions & 300 deletions application/controllers/uploader.php

This file was deleted.

6 changes: 3 additions & 3 deletions application/helpers/qanda_helper.php
Expand Up @@ -4298,19 +4298,19 @@ function do_file_upload($ia)
{
$_SESSION['preview'] = 1 ;
$questgrppreview = 1; // Preview is launched from Question or group level
$scriptloc = Yii::app()->createUrl('uploader/');
$scriptloc = Yii::app()->createUrl('uploader/index');
}
else if ($thissurvey['active'] != "Y")
{
$_SESSION['preview'] = 1;
$questgrppreview = 0;
$scriptloc = Yii::app()->createUrl('uploader/');
$scriptloc = Yii::app()->createUrl('uploader/index');
}
else
{
$_SESSION['preview'] = 0;
$questgrppreview = 0;
$scriptloc = Yii::app()->createUrl('uploader/');
$scriptloc = Yii::app()->createUrl('uploader/index');
}

$uploadbutton = "<h2><a id='upload_".$ia[1]."' class='upload' href='{$scriptloc}/sid/{$surveyid}/fieldname/{$ia[1]}/qid/{$ia[0]}/preview/"
Expand Down
4 changes: 2 additions & 2 deletions scripts/modaldialog.js
Expand Up @@ -136,14 +136,14 @@ function displayUploadedFiles(jsonstring, filecount, fieldname, show_title, show
if (pos)
{
if (isValueInArray(image_extensions, jsonobj[i].ext))
display += '<tr><td><img src="uploader.php?sid='+surveyid+'&amp;filegetcontents='+decodeURIComponent(jsonobj[i].filename)+'" height=100px align="center"/></td>';
display += '<tr><td><img src="uploader/index/sid/'+surveyid+'/filegetcontents/'+decodeURIComponent(jsonobj[i].filename)+'" height=100px align="center"/></td>';
else
display += '<tr><td><img src="images/placeholder.png" height=100px align="center"/></td>';
}
else
{
if (isValueInArray(image_extensions, jsonobj[i].ext))
display += '<tr><td><img src="uploader.php?filegetcontents='+decodeURIComponent(jsonobj[i].filename)+'" height=100px align="center"/></td>';
display += '<tr><td><img src="uploader/index/filegetcontents/'+decodeURIComponent(jsonobj[i].filename)+'" height=100px align="center"/></td>';
else
display += '<tr><td><img src="images/placeholder.png" height=100px align="center"/></td>';
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/uploader.css
Expand Up @@ -55,11 +55,11 @@ img {
.success {
color: #4F8A10;
background-color: #DFF2BF;
background-image:url('../images/success_notice.png');
background-image:url('../../images/success_notice.png');
}

.error {
color: #D8000C;
background-color: #FFBABA;
background-image: url('../images/error_notice.png');
background-image: url('../../images/error_notice.png');
}

0 comments on commit 73437a7

Please sign in to comment.