From 6e50b07a15877eda5edca0fd92638d16ca5a2301 Mon Sep 17 00:00:00 2001 From: e107steved Date: Mon, 14 Mar 2011 20:54:56 +0000 Subject: [PATCH] Bugtracker #5176 - path for uploaded avatars not calculated correctly --- e107_handlers/validator_class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/e107_handlers/validator_class.php b/e107_handlers/validator_class.php index 85b1d07ca..ffb8211bc 100644 --- a/e107_handlers/validator_class.php +++ b/e107_handlers/validator_class.php @@ -1104,11 +1104,15 @@ class validatorClass { if (strpos('-upload-', $value) === 0) { - $img = e_UPLOAD.'avatars/'.$value; // Its a server-stored image + $img = e_UPLOAD.'avatars/'.str_replace('-upload-', '', $value); // Its a user-uploaded image + } + elseif (strpos($avName, '/') !== FALSE) + { + $img = $value; // Its a remote image } else { - $img = $value; // Its a remote image + $img = e_MEDIA.'avatars/'.$value; // Its a server-stored image } } // Deliberately fall through into normal image processing