Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix 8378: Select custom avatar for default Gravatar image.
  • Loading branch information
giallu committed Oct 14, 2007
1 parent b5970a1 commit 9fab30d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion config_defaults_inc.php
Expand Up @@ -18,7 +18,7 @@
# along with Mantis. If not, see <http://www.gnu.org/licenses/>.

# --------------------------------------------------------
# $Id: config_defaults_inc.php,v 1.364.2.2 2007-10-13 22:33:12 giallu Exp $
# $Id: config_defaults_inc.php,v 1.364.2.3 2007-10-14 22:35:35 giallu Exp $
# --------------------------------------------------------


Expand Down Expand Up @@ -540,6 +540,9 @@
# Only users above this threshold will have their avatar shown
$g_show_avatar_threshold = DEVELOPER;

# Default avatar for users without a gravatar account
$g_default_avatar = "%path%images/no_avatar.png";

############################
# Mantis JPGRAPH Addon
############################
Expand Down
4 changes: 2 additions & 2 deletions core/user_api.php
Expand Up @@ -18,7 +18,7 @@
# along with Mantis. If not, see <http://www.gnu.org/licenses/>.

# --------------------------------------------------------
# $Id: user_api.php,v 1.113.2.2 2007-10-14 20:50:58 giallu Exp $
# $Id: user_api.php,v 1.113.2.3 2007-10-14 22:35:35 giallu Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -653,7 +653,7 @@ function user_get_avatar( $p_user_id ) {
if ( is_blank( $t_email ) ) {
$t_result = false;
} else {
$t_default_image = "/images/gravatar_logo.gif";
$t_default_image = config_get( 'default_avatar' );
$t_size = 80;
$t_avatar_url = "http://www.gravatar.com/avatar.php?gravatar_id=" . md5( $t_email ) .
"&amp;default=" . urlencode( $t_default_image ) .
Expand Down
Binary file removed images/gravatar_logo.gif
Binary file not shown.
Binary file added images/no_avatar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9fab30d

Please sign in to comment.