From 28de3911825bde79ee5a92762940ef310baab737 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Tue, 6 Nov 2012 13:21:04 +0100 Subject: Recursively resolve paths of iframe contents; unify contentframe registration and reduce code-duplication --- program/steps/addressbook/func.inc | 7 +------ program/steps/mail/func.inc | 2 +- program/steps/settings/folders.inc | 7 +------ program/steps/settings/func.inc | 7 +------ program/steps/settings/identities.inc | 6 +----- 5 files changed, 5 insertions(+), 24 deletions(-) (limited to 'program/steps') diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index 3a0508025..cefe49e01 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -367,12 +367,7 @@ function rcmail_contact_frame($attrib) if (!$attrib['id']) $attrib['id'] = 'rcmcontactframe'; - $attrib['name'] = $attrib['id']; - - $OUTPUT->set_env('contentframe', $attrib['name']); - $OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/resources/blank.gif'); - - return html::iframe($attrib); + return $OUTPUT->frame($attrib, true); } diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 47d1a484a..9ad3a6e6f 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -471,7 +471,7 @@ function rcmail_messagecontent_frame($attrib) $OUTPUT->set_env('contentframe', $attrib['id']); $OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/resources/blank.gif'); - return html::iframe($attrib); + return $OUTPUT->frame($attrib, true); } diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc index 12e449e80..0c7d9063f 100644 --- a/program/steps/settings/folders.inc +++ b/program/steps/settings/folders.inc @@ -369,12 +369,7 @@ function rcmail_folder_frame($attrib) if (!$attrib['id']) $attrib['id'] = 'rcmfolderframe'; - $attrib['name'] = $attrib['id']; - - $OUTPUT->set_env('contentframe', $attrib['name']); - $OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/resources/blank.gif'); - - return html::iframe($attrib); + return $OUTPUT->frame($attrib, true); } function rcmail_rename_folder($oldname, $newname) diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index d5ccbb2d7..8bef2ff51 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -31,12 +31,7 @@ function rcmail_preferences_frame($attrib) if (!$attrib['id']) $attrib['id'] = 'rcmprefsframe'; - $attrib['name'] = $attrib['id']; - - $OUTPUT->set_env('contentframe', $attrib['name']); - $OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/resources/blank.gif'); - - return html::iframe($attrib); + return $OUTPUT->frame($attrib, true); } diff --git a/program/steps/settings/identities.inc b/program/steps/settings/identities.inc index 26bd432c2..82a1841a3 100644 --- a/program/steps/settings/identities.inc +++ b/program/steps/settings/identities.inc @@ -33,11 +33,7 @@ function rcmail_identity_frame($attrib) if (!$attrib['id']) $attrib['id'] = 'rcmIdentityFrame'; - $attrib['name'] = $attrib['id']; - - $OUTPUT->set_env('contentframe', $attrib['name']); - - return html::iframe($attrib); + return $OUTPUT->frame($attrib, true); } $OUTPUT->add_handler('identityframe', 'rcmail_identity_frame'); -- cgit v1.2.3