Skip to content

Commit

Permalink
Fixed issue #6893: Image path malformed on import of survey structure
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Nov 18, 2012
1 parent 8a10f16 commit 96965a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/helpers/common_helper.php
Expand Up @@ -4010,13 +4010,13 @@ function translateLinks($sType, $iOldSurveyID, $iNewSurveyID, $sString)
if ($sType == 'survey')
{
$sPattern = "([^'\"]*)/upload/surveys/{$iOldSurveyID}/";
$sReplace = Yii::app()->getConfig("relativeurl")."/upload/surveys/{$iNewSurveyID}/";
$sReplace = Yii::app()->getConfig("publicurl")."upload/surveys/{$iNewSurveyID}/";
return preg_replace('#'.$sPattern.'#', $sReplace, $sString);
}
elseif ($sType == 'label')
{
$pattern = "([^'\"]*)/upload/labels/{$iOldSurveyID}/";
$replace = Yii::app()->getConfig("relativeurl")."/upload/labels/{$iNewSurveyID}/";
$replace = Yii::app()->getConfig("publicurl")."upload/labels/{$iNewSurveyID}/";
return preg_replace('#'.$pattern.'#', $replace, $sString);
}
else // unkown type
Expand Down

0 comments on commit 96965a3

Please sign in to comment.