From b4aca1db30f57f8172231dd314fae9d392967bdf Mon Sep 17 00:00:00 2001 From: thomasb Date: Mon, 31 Jul 2006 22:51:23 +0000 Subject: Compose, save and sendmail cleanup git-svn-id: https://svn.roundcube.net/trunk@288 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/main.inc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'roundcubemail/program/include/main.inc') diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index bbfba07fc..48e485ce2 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -712,7 +712,7 @@ function show_message($message, $type='notice', $vars=NULL) return 'this.'.$command; else - $OUTPUT->add_script(sprintf("%s%s.%s", + $OUTPUT->add_script(sprintf("%s%s.%s\n", $framed ? sprintf('if(parent.%s)parent.', $JS_OBJECT_NAME) : '', $JS_OBJECT_NAME, $command)); @@ -789,6 +789,19 @@ function rcube_remote_response($js_code, $flush=FALSE) } +// send correctly formatted response for a request posted to an iframe +function rcube_iframe_response($js_code='') + { + global $OUTPUT, $JS_OBJECT_NAME; + + if (!empty($js_code)) + $OUTPUT->add_script("if(parent.$JS_OBJECT_NAME){\n" . $js_code . "\n}"); + + $OUTPUT->write(); + exit; + } + + // read directory program/localization/ and return a list of available languages function rcube_list_languages() { -- cgit v1.2.3