quiten a warning

This commit is contained in:
Ralf Becker 2014-10-02 10:32:16 +00:00
parent 943771a3e4
commit bbe01a96aa

View File

@ -155,7 +155,7 @@ class egw_favorites
$fav_sort_pref = self::get_fav_sort_pref($app); $fav_sort_pref = self::get_fav_sort_pref($app);
// Look through all preferences & pull out favorites // 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) 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 * 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 $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 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 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 * @param array $filters key => value pairs for the filter
* @return boolean Success * @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 // 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); $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 // older group-favorites have just true as their group and are not deletable, if we dont find correct group