diff --git a/admin/inc/class.customfields.inc.php b/admin/inc/class.customfields.inc.php index 0f020e3979..e2267c5758 100644 --- a/admin/inc/class.customfields.inc.php +++ b/admin/inc/class.customfields.inc.php @@ -117,7 +117,7 @@ $content = array( 'type' => $type, ); - list(,$referer) = explode($GLOBALS['egw_info']['server']['webserver_url'],$_SERVER['HTTP_REFERER']); + $referer = $GLOBALS['egw']->common->get_referer(); } $GLOBALS['egw_info']['flags']['app_header'] = $GLOBALS['egw_info']['apps'][$this->appname]['title'].' - '.lang('Custom fields'); diff --git a/preferences/inc/class.uiaclprefs.inc.php b/preferences/inc/class.uiaclprefs.inc.php index e1b766dc71..09f0a04208 100644 --- a/preferences/inc/class.uiaclprefs.inc.php +++ b/preferences/inc/class.uiaclprefs.inc.php @@ -48,8 +48,7 @@ $referer = $_POST['referer']; if (!$referer) { - list(,$referer) = explode($GLOBALS['egw_info']['server']['webserver_url'],$_SERVER['HTTP_REFERER']); - if (!$referer) $referer = '/preferences/index.php'; + $referer = $GLOBALS['egw']->common->get_referer('/preferences/index.php'); } //echo '

'."referer='$referer'

\n"; diff --git a/preferences/inc/class.uicategories.inc.php b/preferences/inc/class.uicategories.inc.php index d9875b7b55..c7518b1352 100644 --- a/preferences/inc/class.uicategories.inc.php +++ b/preferences/inc/class.uicategories.inc.php @@ -113,8 +113,7 @@ $cats_level = get_var('cats_level',array('GET','POST')); // make categories called via sidebox menu of an app, to behave like a part of that app - list(,$referer) = explode($GLOBALS['egw_info']['server']['webserver_url'],$_SERVER['HTTP_REFERER']); - if (!$referer) $referer = '/preferences/index.php'; + $referer = $GLOBALS['egw']->common->get_referer('/preferences/index.php'); if (!strstr($referer,'menuaction=preferences.uicategories')) { $this->referer = $referer; diff --git a/preferences/inc/class.uisettings.inc.php b/preferences/inc/class.uisettings.inc.php index 1f235eec08..86185082c8 100755 --- a/preferences/inc/class.uisettings.inc.php +++ b/preferences/inc/class.uisettings.inc.php @@ -34,8 +34,7 @@ function index() { // make preferences called via sidebox menu of an app, to behave like a part of that app - list(,$referer) = explode($GLOBALS['egw_info']['server']['webserver_url'],$_SERVER['HTTP_REFERER']); - if (!$referer) $referer = '/preferences/index.php'; + $referer = $GLOBALS['egw']->common->get_referer('/preferences/index.php'); if (!preg_match('/(preferences.php|menuaction=preferences.uisettings.index)+/i',$referer)) { $this->bo->session_data['referer'] = $referer;