From: pdontthink Date: Tue, 6 Feb 2007 02:00:33 +0000 (+0000) Subject: Allow other plugins to ask for message list refresh X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=8e455945c0e639a96930cb5ec7d6826ed532e97b;hp=a22d16719894d7991dab04e5110e78d1de4b7b2c Allow other plugins to ask for message list refresh git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12226 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/plugins/preview_pane/functions.php b/plugins/preview_pane/functions.php index 2fbaf1b8..fef1e0cf 100644 --- a/plugins/preview_pane/functions.php +++ b/plugins/preview_pane/functions.php @@ -89,14 +89,15 @@ function preview_pane_message_list_do() if (!checkForJavascript()) return; - // globalize $pp_forceTopURL and $pp_noPageHeader to synch + // globalize $pp_refresh_top, $pp_forceTopURL and $pp_noPageHeader to synch // with other plugins (sent_confirmation, for example) // global $plugins, $archive_mail_button_has_been_printed, - $username, $data_dir, $PHP_SELF, $base_uri, + $username, $data_dir, $PHP_SELF, $base_uri, $pp_refresh_top, $pp_forceTopURL, $pp_noPageHeader; + sqgetGlobalVar('pp_refresh_top', $pp_refresh_top, SQ_GET); $output = ''; $use_previewPane = getPref($data_dir, $username, 'use_previewPane', 0); @@ -105,7 +106,9 @@ function preview_pane_message_list_do() // preview_pane_change_message_target_do() // if ($use_previewPane == 1 - && getPref($data_dir, $username, 'pp_refresh_message_list', 1) == 1) +// Bah, let's put this in anyway (even when the "always refresh thing is off), +// in case someone else wants to use it +// && getPref($data_dir, $username, 'pp_refresh_message_list', 1) == 1) { // sqgetGlobalVar('REQUEST_URI', $request_uri, SQ_SERVER); $request_uri = $PHP_SELF; @@ -142,6 +145,13 @@ function preview_pane_message_list_do() } + // if someone else asks for it, force the message list to reload + // + else if ($pp_refresh_top) + echo " if (typeof(parent.right.pp_refresh) != 'undefined')\n" + . " parent.right.pp_refresh()\n\n"; + + $output .= " document.location = '" . $base_uri . "plugins/preview_pane/empty_frame.php'\n" . " }\n" . "//-->\n"