From 947aeabe29f429b177606b78abbacf3eceddbb8e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 22 Feb 2021 13:50:46 +0100 Subject: [PATCH] Implement ISafeFormatAvatar in DefaultAvatar --- .../files/images/avatars/avatar-default.png | Bin 0 -> 990 bytes .../data/user/avatar/DefaultAvatar.class.php | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 wcfsetup/install/files/images/avatars/avatar-default.png diff --git a/wcfsetup/install/files/images/avatars/avatar-default.png b/wcfsetup/install/files/images/avatars/avatar-default.png new file mode 100644 index 0000000000000000000000000000000000000000..2bd3f759c1f0ae8dea66d0dcfd72f0d89c70be92 GIT binary patch literal 990 zcmV<410np0P)C00004XF*Lt006O% z3;baP00001b5ch_0Itp)=>Px#!%$3AMgRZ*FLA6!}ay`#Kgqt z=;+$o+P}ZQl?| z?bz7Z?(Xi(%gfx{+|||9>+9>m!NK$M^U2A{=jZ3r($eto@Y~zl)YR0*#>VRE>c_{& z$jHd-?CjUq*Yx!C%-+GQ0008HNkl5t3@rMep6xfj!468G|}0J4ow|A@cI>;uXcok^>-3{Y*lkacDg(CpI1ber}7 zql7flN^JqYbVw_m)DEDTkY)~*4S?#BcDl*}z$1gS@qjHEr9=a=#0=2Nz<>=IriTUO zzA3=Zp@1G4r$7Q!Yz~MO5U?diN+4js0gQ2gV9o)|0~laOth|Q-COp6m3~fc)Yr7(UwssE-*T5Q}&^ren zYys{=JwSMG2avb4XK`)?FxDSNuQmWnlX1Mn1Juw2FjR0rVRj>WKm#hnmL#gc0OJ?B zhXss`Yoc%j1u(kOJ0u_t%>iKw1h6`q84fV@IRL%a;oGR|hde+MfB-9EW(5KaxPSo$ zFpao?XbJ&55<8C&z>yC)A^^>h4+xt8z=;I;2>|?%0G{Lk_vc2a==6cc$EXzBET;> z;6(yZp&Sq@0pL3U@=XBvi~uYIfF1%+2mosYU@ZXj5rDn`a6kYKd;nq>UfPFe0VzR} zvH^PxV9y3DFn|RcaKZpiY(Rkl6l}l@1DLS^V+>%-1{^Vfv;Qgk4bV(EtH%BA_y7O^ M07*qoM6N<$f_&HSzyJUM literal 0 HcmV?d00001 diff --git a/wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php b/wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php index d69b8c9fd0..cc4beb05ca 100644 --- a/wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php +++ b/wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php @@ -13,7 +13,7 @@ use wcf\util\StringUtil; * @license GNU Lesser General Public License * @package WoltLabSuite\Core\Data\User\Avatar */ -class DefaultAvatar implements IUserAvatar +class DefaultAvatar implements IUserAvatar, ISafeFormatAvatar { /** * image size @@ -68,6 +68,22 @@ SVG; } } + /** + * @inheritDoc + */ + public function getSafeURL(?int $size = null): string + { + return WCF::getPath() . 'images/avatars/avatar-default.png'; + } + + /** + * @inheritDoc + */ + public function getSafeImageTag(?int $size = null): string + { + return ''; + } + /** * @inheritDoc */ -- 2.20.1