Skip to content

Commit

Permalink
Fixed warning if a second language is added to an empy labelset.
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@2839 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
David Olivier committed May 2, 2007
1 parent 9ee8cbb commit f0ef309
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions admin/labels.php
Expand Up @@ -466,12 +466,15 @@ function updateset($lid)
$result=db_execute_assoc($query);
if ($result) { while ($row=$result->FetchRow()) {$oldcodesarray[$row['code']]=$row['sortorder'];} }
$sqlvalues='';
foreach ($addlangidsarray as $addedlangid)
if (count($oldcodesarray) > 0 )
{
foreach ($oldcodesarray as $oldcode => $oldsortorder)
foreach ($addlangidsarray as $addedlangid)
{
$sqlvalues .= ", ($lid, '$oldcode', '$oldsortorder', '$addedlangid')";
}
foreach ($oldcodesarray as $oldcode => $oldsortorder)
{
$sqlvalues .= ", ($lid, '$oldcode', '$oldsortorder', '$addedlangid')";
}
}
}
if ($sqlvalues)
{
Expand Down
2 changes: 1 addition & 1 deletion admin/statistics.php
Expand Up @@ -719,7 +719,7 @@ function show(element) {
$prb->frame['top'] = 80; // Frame position from top
$prb->addLabel('text','txt1','Please wait ...'); // add Text as Label 'txt1' and value 'Please wait'
$prb->addLabel('percent','pct1'); // add Percent as Label 'pct1'
$prb->addButton('btn1','Go Back','?action=statistics&sid='.$sid); // add Button as Label 'btn1' and action '?restart=1'
$prb->addButton('btn1','Go Back','?action=statistics&sid='.$surveyid); // add Button as Label 'btn1' and action '?restart=1'

$process_status = 35;

Expand Down

0 comments on commit f0ef309

Please sign in to comment.