Skip to content

Commit

Permalink
Fixed issue #5909: Re-uploading files after deletions and other probl…
Browse files Browse the repository at this point in the history
…ems with File Upload question type and Expression Manager
  • Loading branch information
c-schmitz committed Mar 20, 2012
1 parent c88a74c commit 273baf9
Show file tree
Hide file tree
Showing 5 changed files with 6,953 additions and 6,931 deletions.
10 changes: 5 additions & 5 deletions admin/translate_google_api.php
Expand Up @@ -17,13 +17,13 @@
$sTolang = str_replace($aSearch,$aReplace,$sTolang);

try {

$objGt = new Gtranslate;
// Gtranslate requires you to run function named XXLANG_to_XXLANG
$sProcedure = $sBaselang."_to_".$sTolang;

$parts = LimeExpressionManager::SplitStringOnExpressions($sToconvert);

$sparts = array();
foreach($parts as $part)
{
Expand All @@ -35,7 +35,7 @@
{
$convertedPart = $objGt->$sProcedure($part[0]);
$convertedPart = str_replace("<br>","\r\n",$convertedPart);
$convertedPart = html_entity_decode(stripcslashes($convertedPart));
$convertedPart = html_entity_decode(stripcslashes($convertedPart));
$sparts[] = $convertedPart;
}
}
Expand All @@ -47,7 +47,7 @@
'tolang' => $sTolang,
'converted' => $sConverted
);

} catch (GTranslateException $ge){

// Get the error message and build the ouput array
Expand Down
2 changes: 1 addition & 1 deletion delete.php
Expand Up @@ -78,7 +78,7 @@
$iFileIndex++;
}
if ($found==true) unset($aFiles[$iFileIndex]);
$_SESSION[$sFieldname] = json_encode($aFiles);
$_SESSION[$sFieldname] = str_replace('{','{ ',json_encode($aFiles));
}

if (@unlink($sFileDir.$sFilename))
Expand Down

0 comments on commit 273baf9

Please sign in to comment.