From 7f4f340efd5a3a8ae427ee8bbde76347f308b075 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 27 Nov 2014 17:31:03 +0000 Subject: [PATCH] Missing code from commit r49612 --- etemplate/inc/class.etemplate.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index 1e79815c08..1e460fc099 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -2203,6 +2203,12 @@ class etemplate extends boetemplate $on = str_replace($matches[0], "egw_openWindowCentered2('$matches[1]', '$matches[2]', $matches[3], $matches[4], '$matches[5]')", $on); } + // replace window.close() with EGw's egw.close() + if (strpos($on,'window.close(') !== false) + { + $on = str_replace('window.close(', 'egw(window).close(', $on); + } + // replace xajax calls to code in widgets, with the "etemplate" handler, // this allows to call widgets with the current app, otherwise everyone would need etemplate run rights if (strpos($on,"xajax_doXMLHTTP('etemplate.") !== false)