+
$starting
ENDPROGBAR
- $r->print($content.&LCprogressbar_script());
- $r->rflush();
+ &r_print($r,$content.&LCprogressbar_script($LCcurrentid));
}
sub LCprogressbarUpdate {
@@ -7211,27 +7215,35 @@ sub LCprogressbarUpdate {
$LClastpercent=$val;
unless ($text) { $text=$val.'%'; }
$text=&js_ready($text);
- $r->print(<
//
ENDUPDATE
- $r->rflush();
}
sub LCprogressbarClose {
my ($r)=@_;
$LClastpercent=0;
- $r->print(<
//
ENDCLOSE
- $r->rflush();
+}
+
+sub r_print {
+ my ($r,$to_print)=@_;
+ if ($r) {
+ $r->print($to_print);
+ $r->rflush();
+ } else {
+ print($to_print);
+ }
}
sub html_encode {
@@ -7241,6 +7253,7 @@ sub html_encode {
return $result;
}
+
sub js_ready {
my ($result) = @_;