Skip to content

Commit

Permalink
исправление ошибки в сущности блога при получении исходного (оригинала)
Browse files Browse the repository at this point in the history
размера аватара блога getAvatarPath(0)

раньше при запросе исходного размера терялось расширение файла.

Signed-off-by: Serge Pustovit <light.feel@gmail.com>
  • Loading branch information
psnet committed Feb 20, 2012
1 parent 6a7e9fd commit 01e58d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/modules/blog/entity/Blog.entity.class.php
Expand Up @@ -70,7 +70,7 @@ public function getVote() {
}
public function getAvatarPath($iSize=48) {
if ($sPath=$this->getAvatar()) {
return preg_replace("#_\d{1,3}x\d{1,3}(\.\w{3,4})$#",(($iSize==0)?"":"_{$iSize}x{$iSize}\\1"),$sPath);
return preg_replace("#_\d{1,3}x\d{1,3}(\.\w{3,4})$#", ((($iSize==0)?"":"_{$iSize}x{$iSize}") . "\\1"),$sPath);
} else {
return Config::Get('path.static.skin').'/images/avatar_blog_'.$iSize.'x'.$iSize.'.gif';
}
Expand Down

0 comments on commit 01e58d6

Please sign in to comment.