Permalink
Browse files

Remove unnecessary filter_ensure_valid_filter() call

user_get_bug_filter() already calls filter_ensure_valid_filter(), we
therefore only need to call it when unserializing the filter from token
  • Loading branch information...
1 parent 8947439 commit 0d9dcf09d1073a684399eae2caa3d6cce27b875e @dregad dregad committed Oct 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/current_user_api.php
View
2 core/current_user_api.php
@@ -222,13 +222,13 @@ function current_user_get_bug_filter( $p_project_id = null ) {
} else {
$t_filter = unserialize( $f_filter_string );
}
+ $t_filter = filter_ensure_valid_filter( $t_filter );
} else if( !filter_is_cookie_valid() ) {
return false;
} else {
$t_user_id = auth_get_current_user_id();
$t_filter = user_get_bug_filter( $t_user_id, $p_project_id );
}
- $t_filter = filter_ensure_valid_filter( $t_filter );
return $t_filter;
}

0 comments on commit 0d9dcf0

Please sign in to comment.