Fixes problems caused by Chinese character set.

This commit is contained in:
JT Smith 2002-09-12 02:24:44 +00:00
parent e79d1f4e19
commit 275e7877df
2 changed files with 5 additions and 2 deletions

View file

@ -1,4 +1,7 @@
insert into webguiVersion values ('4.6.8','upgrade',unix_timestamp());
delete from international where internationalId=12 and namespace='Poll');
INSERT INTO international VALUES (12,'Poll',1,'Total Votes:',1031514049);
INSERT INTO international VALUES (12,'Poll',7,'总投票人数:',1031514049);'

View file

@ -216,7 +216,7 @@ sub www_view {
$totalResponses = 1;
}
for ($i=1; $i<=20; $i++) {
if ($_[0]->get('a'.$i) =~ /\w/) {
if ($_[0]->get('a'.$i) =~ /\C/) {
$output .= '<span class="pollAnswer"><hr size="1">'.$_[0]->get('a'.$i).'<br></span>';
@data = WebGUI::SQL->quickArray("select count(*), answer from Poll_answer where answer='a$i' and wobjectId="
.$_[0]->get("wobjectId")." group by answer");
@ -226,7 +226,7 @@ sub www_view {
round(100*$data[0]/$totalResponses).'% ('.($data[0]+0).')</td></tr></table>';
}
}
$output .= '<span class="pollAnswer"><hr size="1"><b>Total Votes:</b> '.$totalResponses.'</span>';
$output .= '<span class="pollAnswer"><hr size="1"><b>'.WebGUI::International::get(12,$namespace).'</b> '.$totalResponses.'</span>';
}
return $_[0]->processMacros($output);
}