From 31b2ac50c49873340ebb4d737f7965b5fefb762c Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sun, 6 Jun 2010 22:12:41 -0400 Subject: [PATCH] A few more replacements of Horde_Util::closeWindowJS() --- hermes/start.php | 5 ++++- trean/add.php | 2 +- trean/edit.php | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hermes/start.php b/hermes/start.php index b208f53fc..32c314dd0 100644 --- a/hermes/start.php +++ b/hermes/start.php @@ -34,7 +34,10 @@ if ($form->validate($vars)) { 'time' => $now); $prefs->setValue('running_timers', serialize($timers), false); - Horde_Util::closeWindowJS('alert(\'' . addslashes(sprintf(_("The stop watch \"%s\" has been started and will appear in the sidebar at the next refresh."), $vars->get('description'))) . '\');'); + echo Horde::wrapInlineScript(array( + 'alert(\'' . addslashes(sprintf(_("The stop watch \"%s\" has been started and will appear in the sidebar at the next refresh."), $vars->get('description'))), + 'window.close();' + )); exit; } diff --git a/trean/add.php b/trean/add.php index 17d108c52..9958b1226 100644 --- a/trean/add.php +++ b/trean/add.php @@ -61,7 +61,7 @@ case 'add_bookmark': $notification->push(sprintf(_("There was an error adding the bookmark: %s"), $result->getMessage()), 'horde.error'); } else { if (Horde_Util::getFormData('popup')) { - Horde_Util::closeWindowJS(); + echo Horde::wrapInlineScript(array('window.close();')); } elseif (Horde_Util::getFormData('iframe')) { $notification->push(_("Bookmark Added"), 'horde.success'); require TREAN_TEMPLATES . '/common-header.inc'; diff --git a/trean/edit.php b/trean/edit.php index 4e54ee524..e0a60f2db 100644 --- a/trean/edit.php +++ b/trean/edit.php @@ -91,7 +91,7 @@ case 'save': if (Horde_Util::getFormData('popup')) { if ($notification->count() <= 1) { - Horde_Util::closeWindowJS(); + echo Horde::wrapInlineScript(array('window.close();')); } else { $notification->notify(); } -- 2.11.0