Skip to content

Commit

Permalink
Dev Fixed some minor notices
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@9503 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Nov 18, 2010
1 parent 40155e1 commit 21f6c35
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
4 changes: 2 additions & 2 deletions admin/importgroup.php
Expand Up @@ -884,8 +884,8 @@ function XMLImportGroup($sFullFilepath, $newsid)
$aLanguagesSupported[]=$sBaseLanguage; // adds the base language to the list of supported languages
$aLanguagesSupported=array_merge($aLanguagesSupported,GetAdditionalLanguagesFromSurveyID($newsid));

$xml = simplexml_load_file($sFullFilepath);
if ($xml->LimeSurveyDocType!='Group') safe_die('This is not a valid LimeSurvey group structure XML file.');
$xml = @simplexml_load_file($sFullFilepath);
if ($xml==false || $xml->LimeSurveyDocType!='Group') safe_die('This is not a valid LimeSurvey group structure XML file.');
$dbversion = (int) $xml->DBVersion;
$aQIDReplacements=array();
$results['defaultvalues']=0;
Expand Down
33 changes: 27 additions & 6 deletions admin/importlabel.php
Expand Up @@ -48,18 +48,39 @@
elseif (strtolower($sExtension)=='lsl')
{
$aImportResults=XMLImportLabelsets($sFullFilepath, $options);
}
else
{
$importlabeloutput .= "<br />\n<div class='warningheader'>".$clang->gT("Error")."</div><br />\n";
$importlabeloutput .= "<strong><u>".$clang->gT("Label set import summary")."</u></strong><br />\n";
$importlabeloutput .= $clang->gT("Uploaded label set file needs to have an .lsl extension.")."<br /><br />\n";
$importlabeloutput .= "<input type='submit' value='".$clang->gT("Return to label set administration")."' onclick=\"window.open('$scriptname?action=labels', '_top')\" />\n";
$importlabeloutput .= "</div><br />\n";
}
unlink($sFullFilepath);
if (count($aImportResults['warnings'])>0)

if (isset($aImportResults))
{
$importlabeloutput .= "<br />\n<div class='warningheader'>".$clang->gT("Warnings")."</div><ul>\n";
foreach ($aImportResults['warnings'] as $warning)
if (count($aImportResults['warnings'])>0)
{
$importlabeloutput .= '<li>'.$warning.'</li>';
}
$importlabeloutput .= "</ul>\n";
$importlabeloutput .= "<br />\n<div class='warningheader'>".$clang->gT("Warnings")."</div><ul>\n";
foreach ($aImportResults['warnings'] as $warning)
{
$importlabeloutput .= '<li>'.$warning.'</li>';
}
$importlabeloutput .= "</ul>\n";
}

$importlabeloutput .= "<br />\n<div class='successheader'>".$clang->gT("Success")."</div><br />\n";
$importlabeloutput .= "<strong><u>".$clang->gT("Label set import summary")."</u></strong><br />\n";
$importlabeloutput .= "<ul style=\"text-align:left;\">\n\t<li>".$clang->gT("Label sets").": {$aImportResults['labelsets']}</li>\n";
$importlabeloutput .= "\t<li>".$clang->gT("Labels").": {$aImportResults['labels']}</li></ul>\n";
$importlabeloutput .= "<p><strong>".$clang->gT("Import of label set(s) is completed.")."</strong><br /><br />\n";
$importlabeloutput .= "<input type='submit' value='".$clang->gT("Return to label set administration")."' onclick=\"window.open('$scriptname?action=labels', '_top')\" />\n";
$importlabeloutput .= "</div><br />\n";
}


$importlabeloutput .= "<br />\n<div class='successheader'>".$clang->gT("Success")."</div><br />\n";
$importlabeloutput .= "<strong><u>".$clang->gT("Label set import summary")."</u></strong><br />\n";
$importlabeloutput .= "<ul style=\"text-align:left;\">\n\t<li>".$clang->gT("Label sets").": {$aImportResults['labelsets']}</li>\n";
Expand Down
2 changes: 1 addition & 1 deletion admin/integritycheck.php
Expand Up @@ -478,7 +478,7 @@
//1: Get list of "old_token" tables and extract the survey id
//2: Check if that survey id still exists
//3: If it doesn't offer it for deletion
$tables=$connect->MetaTables(false, false, "{$dbprefix}%old%token%");
$tables=$connect->MetaTables(false, false, "{$dbprefix}old%token%");
$oldtsids=array();
$tsids=array();
$folloldtsids=array();
Expand Down
2 changes: 1 addition & 1 deletion group.php
Expand Up @@ -711,7 +711,7 @@ function checkconditions(value, name, type)
* If the value is enclossed by @
* the value of this question must be evaluated instead.
*/
if (preg_match('/^@([0-9]+X([0-9]+)X[^@]+)@/', $cd[3], $comparedfieldname))
if (preg_match('/^@([0-9]+X([0-9]+)X[^@]+)@/', $cd[3], $comparedfieldname) && isset($_SESSION['fieldnamesInfo'][$comparedfieldname[1]]))
{
$sgq_from_sgqa = $_SESSION['fieldnamesInfo'][$comparedfieldname[1]];
$qid_from_sgq=$comparedfieldname[2];
Expand Down

0 comments on commit 21f6c35

Please sign in to comment.