projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bdf6bb
)
Common function for redirects
author
Jamie Cameron
<jcameron@webmin.com>
Thu, 31 Jul 2008 00:38:24 +0000
(
00:38
+0000)
committer
Jamie Cameron
<jcameron@webmin.com>
Thu, 31 Jul 2008 00:38:24 +0000
(
00:38
+0000)
ui-lib.pl
patch
|
blob
|
history
diff --git
a/ui-lib.pl
b/ui-lib.pl
index
89091ac
..
8437d0c
100644
(file)
--- a/
ui-lib.pl
+++ b/
ui-lib.pl
@@
-1430,5
+1430,16
@@
foreach $f (@{$_[2]}) {
return $_[3] ? "$_[3]='$rv'" : $rv;
}
+# js_redirect(url)
+# Returns HTML to trigger a redirect to some URL
+sub js_redirect
+{
+local ($url) = @_;
+if (defined(&theme_js_redirect)) {
+ return &theme_js_redirect(@_);
+ }
+return "<script>window.location = '"."e_escape($url)."';</script>\n";
+}
+
1;