$uid = intval(pathinfo($parameters['uid_ext'], PATHINFO_FILENAME));
}
+ // Please refactor this for the love of everything that's good
+ if (!empty($parameters['id'])) {
+ $uid = $parameters['id'];
+ }
+
$photo = self::getAvatar($uid, $parameters['type'], $customsize ?: Proxy::PIXEL_SMALL);
} else {
- $photoid = MPhoto::stripExtension($parameters['name']);
+ $photoid = pathinfo($parameters['name'], PATHINFO_FILENAME);
$scale = 0;
if (substr($photoid, -2, 1) == "-") {
$scale = intval(substr($photoid, -1, 1));