mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-26 15:59:23 +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']);
|
unset($context['dropped_data']);
|
||||||
|
|
||||||
$need_reload = true;
|
$need_reload = true;
|
||||||
}
|
}
|
||||||
// Title not set for new widgets created via context menu
|
// Title not set for new widgets created via context menu
|
||||||
@ -79,9 +79,16 @@ class home_favorite_portlet extends home_portlet
|
|||||||
|
|
||||||
$need_reload = true;
|
$need_reload = true;
|
||||||
}
|
}
|
||||||
$favorites = egw_favorites::get_favorites($context['appname']);
|
|
||||||
$this->favorite = $favorites[$context['favorite']];
|
// Load and copy favorite
|
||||||
$this->title = $context['title'] = $context['title'] ? $context['title'] : lang($context['appname']) . ' ' . $this->favorite['name'];
|
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;
|
$this->context = $context;
|
||||||
if($this->favorite)
|
if($this->favorite)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user