mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-17 05:23:13 +01:00
quiten a warning
This commit is contained in:
parent
943771a3e4
commit
bbe01a96aa
@ -155,7 +155,7 @@ class egw_favorites
|
||||
$fav_sort_pref = self::get_fav_sort_pref($app);
|
||||
|
||||
// Look through all preferences & pull out favorites
|
||||
foreach($GLOBALS['egw_info']['user']['preferences'][$app] as $pref_name => $pref)
|
||||
foreach((array)$GLOBALS['egw_info']['user']['preferences'][$app] as $pref_name => $pref)
|
||||
{
|
||||
if(strpos($pref_name, $pref_prefix) === 0)
|
||||
{
|
||||
@ -193,16 +193,16 @@ class egw_favorites
|
||||
* Current user needs to be an admin or it will just do nothing quietly
|
||||
*
|
||||
* @param string $app Current application, needed to save preference
|
||||
* @param string $name Name of the favorite
|
||||
* @param string $_name Name of the favorite
|
||||
* @param string $action "add" or "delete"
|
||||
* @param boolean|int|String $group ID of the group to create the favorite for, or 'all' for all users
|
||||
* @param array $filters key => value pairs for the filter
|
||||
* @return boolean Success
|
||||
*/
|
||||
public static function set_favorite($app, $name, $action, $group, $filters = array())
|
||||
public static function set_favorite($app, $_name, $action, $group, $filters = array())
|
||||
{
|
||||
// Only use alphanumeric for preference name, so it can be used directly as DOM ID
|
||||
$name = strip_tags($name);
|
||||
$name = strip_tags($_name);
|
||||
$pref_name = "favorite_".preg_replace('/[^A-Za-z0-9-_]/','_',$name);
|
||||
|
||||
// older group-favorites have just true as their group and are not deletable, if we dont find correct group
|
||||
|
Loading…
Reference in New Issue
Block a user