'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;
}
$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';
if (Horde_Util::getFormData('popup')) {
if ($notification->count() <= 1) {
- Horde_Util::closeWindowJS();
+ echo Horde::wrapInlineScript(array('window.close();'));
} else {
$notification->notify();
}