Skip to content

Commit

Permalink
Dev: less random in new question title when importing, can be unvalid…
Browse files Browse the repository at this point in the history
… only with first numeric
  • Loading branch information
Shnoulle committed Dec 10, 2013
1 parent 6b63cd9 commit 38a8568
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/helpers/admin/import_helper.php
Expand Up @@ -3646,7 +3646,7 @@ function XMLImportSurvey($sFullFilepath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe
{
$sOldTitle=$oQuestion->title;
$sNewTitle=preg_replace("/[^A-Za-z0-9]/", '', $sOldTitle);
if (is_numeric($sNewTitle))
if (is_numeric(substr($sNewTitle,0,1)))
{
$sNewTitle='q' . $sNewTitle;
}
Expand Down Expand Up @@ -3739,7 +3739,7 @@ function XMLImportSurvey($sFullFilepath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe
{
$sOldTitle=$question->title;
$sNewTitle=preg_replace("/[^A-Za-z0-9]/", '', $sOldTitle);
if (is_numeric($sNewTitle))
if (is_numeric(substr($sNewTitle,0,1)))
{
$sNewTitle='sq' . $sNewTitle;
}
Expand Down

0 comments on commit 38a8568

Please sign in to comment.