mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-19 11:50:51 +01:00
Fix opening the same URL twice did not go to the specified destination the second time a second time.
This time we redirect to index.php?cd=yes so reload also works, and fix the last active tab.
This commit is contained in:
parent
3808dd6fee
commit
d5831a4229
@ -856,12 +856,23 @@ abstract class Ajax extends Api\Framework
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check if user called a specific url --> open it as active tab
|
// check if user called a specific url --> open it as active tab
|
||||||
$active_tab = $GLOBALS['egw_info']['user']['preferences']['common']['active_tab'];
|
|
||||||
$last_direct_url =& Api\Cache::getSession(__CLASS__, 'last_direct_url');
|
$last_direct_url =& Api\Cache::getSession(__CLASS__, 'last_direct_url');
|
||||||
if ($url)
|
if ($last_direct_url)
|
||||||
{
|
{
|
||||||
$active_tab = $url_tab = self::app_from_url($url);
|
$url = $last_direct_url;
|
||||||
|
$active_tab = self::app_from_url($last_direct_url);
|
||||||
|
}
|
||||||
|
else if (strpos($url, 'menuaction') > 0)
|
||||||
|
{
|
||||||
|
// Coming in with a specific URL, save it and redirect to index.php
|
||||||
|
// so reloads work nicely
|
||||||
$last_direct_url = $url;
|
$last_direct_url = $url;
|
||||||
|
Api\Framework::redirect_link('/index.php?cd=yes');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$active_tab = $GLOBALS['egw_info']['user']['preferences']['common']['active_tab'];
|
||||||
|
if (!$active_tab) $active_tab = $default_app;
|
||||||
}
|
}
|
||||||
|
|
||||||
//self::app_from_url might return an application the user has no rights
|
//self::app_from_url might return an application the user has no rights
|
||||||
@ -874,13 +885,13 @@ abstract class Ajax extends Api\Framework
|
|||||||
{
|
{
|
||||||
$url = preg_replace('/[&?]cd=yes/','',$url);
|
$url = preg_replace('/[&?]cd=yes/','',$url);
|
||||||
}
|
}
|
||||||
$apps[$active_tab]['openOnce'] = $url;
|
if($last_direct_url)
|
||||||
|
{
|
||||||
|
$apps[$active_tab]['openOnce'] = $url;
|
||||||
|
}
|
||||||
$store_prefs = true;
|
$store_prefs = true;
|
||||||
}
|
}
|
||||||
else
|
$last_direct_url = null;
|
||||||
{
|
|
||||||
if (!$active_tab) $active_tab = $default_app;
|
|
||||||
}
|
|
||||||
// if we have the open tabs in the session, use it instead the maybe forced common prefs open_tabs
|
// if we have the open tabs in the session, use it instead the maybe forced common prefs open_tabs
|
||||||
if (!($open_tabs = Api\Cache::getSession(__CLASS__, 'open_tabs')))
|
if (!($open_tabs = Api\Cache::getSession(__CLASS__, 'open_tabs')))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user