mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix Avatars and simple empty-contact.png
This commit is contained in:
parent
59cd22625a
commit
77ab2fddf5
2 changed files with 3 additions and 3 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 665 B |
|
|
@ -25,7 +25,7 @@ class AvatarsPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
$bBimi = !empty($this->jsonParam('bimi'));
|
$bBimi = !empty($this->jsonParam('bimi'));
|
||||||
$sEmail = $this->jsonParam('email');
|
$sEmail = $this->jsonParam('email');
|
||||||
$aResult = static::getAvatar(\urldecode($sEmail), !empty($sEmail));
|
$aResult = $this->getAvatar(\urldecode($sEmail), !empty($sEmail));
|
||||||
if ($aResult) {
|
if ($aResult) {
|
||||||
$aResult = [
|
$aResult = [
|
||||||
'type' => $aResult[0],
|
'type' => $aResult[0],
|
||||||
|
|
@ -38,7 +38,7 @@ class AvatarsPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
// public function ServiceAvatar(...$aParts)
|
// public function ServiceAvatar(...$aParts)
|
||||||
public function ServiceAvatar(string $sServiceName, string $sBimi, string $sEmail)
|
public function ServiceAvatar(string $sServiceName, string $sBimi, string $sEmail)
|
||||||
{
|
{
|
||||||
$aResult = static::getAvatar(\urldecode($sEmail), !empty($sEmail));
|
$aResult = $this->getAvatar(\urldecode($sEmail), !empty($sEmail));
|
||||||
if ($aResult) {
|
if ($aResult) {
|
||||||
\header('Content-Type: '.$aResult[0]);
|
\header('Content-Type: '.$aResult[0]);
|
||||||
echo $aResult[1];
|
echo $aResult[1];
|
||||||
|
|
@ -59,7 +59,7 @@ class AvatarsPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function getAvatar(string $sEmail, bool $bBimi) : ?array
|
private function getAvatar(string $sEmail, bool $bBimi) : ?array
|
||||||
{
|
{
|
||||||
if (!\strpos($sEmail, '@')) {
|
if (!\strpos($sEmail, '@')) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue