mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
Save a copy of favorite instead of just referencing the existing favorite.
This commit is contained in:
parent
cb00835cb0
commit
2f86c2a3ca
@ -67,7 +67,7 @@ class home_favorite_portlet extends home_portlet
|
||||
}
|
||||
|
||||
unset($context['dropped_data']);
|
||||
|
||||
|
||||
$need_reload = true;
|
||||
}
|
||||
// Title not set for new widgets created via context menu
|
||||
@ -79,9 +79,16 @@ class home_favorite_portlet extends home_portlet
|
||||
|
||||
$need_reload = true;
|
||||
}
|
||||
$favorites = egw_favorites::get_favorites($context['appname']);
|
||||
$this->favorite = $favorites[$context['favorite']];
|
||||
$this->title = $context['title'] = $context['title'] ? $context['title'] : lang($context['appname']) . ' ' . $this->favorite['name'];
|
||||
|
||||
// Load and copy favorite
|
||||
if($context['favorite'] && !is_array($context['favorite']))
|
||||
{
|
||||
$favorites = egw_favorites::get_favorites($context['appname']);
|
||||
$context['favorite'] = $favorites[$context['favorite']];
|
||||
}
|
||||
|
||||
$this->favorite = $context['favorite'];
|
||||
$this->title = lang($context['appname']) . ': ' . $this->favorite['name'];
|
||||
$this->context = $context;
|
||||
if($this->favorite)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user