Skip to content

Commit

Permalink
Fixed bug on insert left over from only allowing insert on first lang…
Browse files Browse the repository at this point in the history
…uage.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@2526 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
David Olivier committed Mar 8, 2007
1 parent 3ddf46d commit 128e485
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions admin/labels.php
Expand Up @@ -352,7 +352,7 @@
."<strong>".$clang->gT("New label").":</strong> <input type='text' maxlength='10' name='insertcode' size='10' id='addnewlabelcode' />\n"
."\t</td>\n"
."\t<td width='35%'>\n"
."\t<input type='text' maxlength='100' name='inserttitle_$lslanguage' size='80' />\n"
."\t<input type='text' maxlength='100' name='inserttitle' size='80' />\n"
."\t</td>\n"
."\t<td width='25%'>\n"
."\t<input type='submit' name='method' value='".$clang->gT("Add new label")."' />\n"
Expand Down Expand Up @@ -569,12 +569,12 @@ function modlabelsetanswers($lid)
$_POST['insertcode'] = db_quote($_POST['insertcode']);
foreach ($lslanguages as $lslanguage)
{
$_POST['inserttitle_'.$lslanguage] = db_quote($_POST['inserttitle_'.$lslanguage]);
$query = "INSERT INTO ".db_table_name('labels')." (lid, code, title, sortorder,language) VALUES ($lid, '{$_POST['insertcode']}', '{$_POST['inserttitle_'.$lslanguage]}', '$newsortorder','$lslanguage')";
if (!$result = $connect->Execute($query))
{
$labelsoutput.= "<script type=\"text/javascript\">\n<!--\n alert(\"".$clang->gT("Failed to insert label", "js")." - ".$query." - ".$connect->ErrorMsg()."\")\n //-->\n</script>\n";
}
$_POST['inserttitle'] = db_quote($_POST['inserttitle']);
$query = "INSERT INTO ".db_table_name('labels')." (lid, code, title, sortorder,language) VALUES ($lid, '{$_POST['insertcode']}', '{$_POST['inserttitle']}', '$newsortorder','$lslanguage')";
if (!$result = $connect->Execute($query))
{
$labelsoutput.= "<script type=\"text/javascript\">\n<!--\n alert(\"".$clang->gT("Failed to insert label", "js")." - ".$query." - ".$connect->ErrorMsg()."\")\n //-->\n</script>\n";
}
}
}
break;
Expand Down

0 comments on commit 128e485

Please sign in to comment.