using common::get_referer()

This commit is contained in:
Ralf Becker 2005-11-09 12:46:52 +00:00
parent 988b7c1bc5
commit 10ced8ebd5
4 changed files with 4 additions and 7 deletions

View File

@ -117,7 +117,7 @@
$content = array( $content = array(
'type' => $type, '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'); $GLOBALS['egw_info']['flags']['app_header'] = $GLOBALS['egw_info']['apps'][$this->appname]['title'].' - '.lang('Custom fields');

View File

@ -48,8 +48,7 @@
$referer = $_POST['referer']; $referer = $_POST['referer'];
if (!$referer) if (!$referer)
{ {
list(,$referer) = explode($GLOBALS['egw_info']['server']['webserver_url'],$_SERVER['HTTP_REFERER']); $referer = $GLOBALS['egw']->common->get_referer('/preferences/index.php');
if (!$referer) $referer = '/preferences/index.php';
} }
//echo '<p align="right">'."referer='$referer'</p>\n"; //echo '<p align="right">'."referer='$referer'</p>\n";

View File

@ -113,8 +113,7 @@
$cats_level = get_var('cats_level',array('GET','POST')); $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 // 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']); $referer = $GLOBALS['egw']->common->get_referer('/preferences/index.php');
if (!$referer) $referer = '/preferences/index.php';
if (!strstr($referer,'menuaction=preferences.uicategories')) if (!strstr($referer,'menuaction=preferences.uicategories'))
{ {
$this->referer = $referer; $this->referer = $referer;

View File

@ -34,8 +34,7 @@
function index() function index()
{ {
// make preferences called via sidebox menu of an app, to behave like a part of that app // 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']); $referer = $GLOBALS['egw']->common->get_referer('/preferences/index.php');
if (!$referer) $referer = '/preferences/index.php';
if (!preg_match('/(preferences.php|menuaction=preferences.uisettings.index)+/i',$referer)) if (!preg_match('/(preferences.php|menuaction=preferences.uisettings.index)+/i',$referer))
{ {
$this->bo->session_data['referer'] = $referer; $this->bo->session_data['referer'] = $referer;