Skip to content

Commit

Permalink
show_avatar config in db doesn't work
Browse files Browse the repository at this point in the history
Fixes #21165
  • Loading branch information
vboctor authored and Victor Boctor committed Jul 1, 2016
1 parent f3390f6 commit d9ea999
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/Gravatar/Gravatar.php
Expand Up @@ -117,7 +117,7 @@ function hooks() {
*/
function csp_headers() {
# Policy for images: Allow gravatar URL
if( config_get_global( 'show_avatar' ) !== OFF ) {
if( config_get( 'show_avatar' ) !== OFF ) {
# Set CSP header
header( "Content-Security-Policy: img-src 'self' " .
self::getAvatarUrl() );
Expand Down

1 comment on commit d9ea999

@atrol
Copy link
Member

@atrol atrol commented on d9ea999 Jul 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't merge that soon after the PR has been created.
We should have discussed, if the functionality to activate/deactivate gravatars based on projects and/or users is needed.
If not, I would prefer to use config_get_global as it's better than config_get in terms of performance.

Please sign in to comment.