-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(mail): Fix big logos in mail templates for Outlook #46419
Conversation
ec3f2a7
to
7e6ce49
Compare
Added the repair step and pinged the release crew to ask about the enterprise logo |
@@ -186,6 +186,10 @@ | |||
} catch (NotFoundException $e) { | |||
} catch (NotPermittedException $e) { | |||
} | |||
|
|||
if ($key === 'logo') { | |||
$this->config->deleteAppValue('theming', 'logoDimensions'); |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
7e6ce49
to
0252003
Compare
if ($key === 'logo') { | ||
$newImage = @imagecreatefromstring(file_get_contents($tmpFile)); | ||
if ($newImage !== false) { | ||
$this->config->setAppValue('theming', 'logoDimensions', imagesx($newImage) . 'x' . imagesy($newImage)); |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
0252003
to
c9842b6
Compare
} elseif (str_starts_with($detectedMimeType, 'image/svg')) { | ||
$matched = preg_match('/viewbox=["\']\d* \d* (\d*\.?\d*) (\d*\.?\d*)["\']/i', $content, $matches); | ||
if ($matched) { | ||
$this->config->setAppValue('theming', 'logoDimensions', $matches[1] . 'x' . $matches[2]); |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
$this->config->setAppValue('theming', 'logoDimensions', $matches[1] . 'x' . $matches[2]); | ||
} else { | ||
$this->logger->warning('Could not read logo image dimensions to optimize for mail header'); | ||
$this->config->deleteAppValue('theming', 'logoDimensions'); |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
} | ||
} else { | ||
$this->logger->warning('Could not read logo image dimensions to optimize for mail header'); | ||
$this->config->deleteAppValue('theming', 'logoDimensions'); |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
c9842b6
to
37154e2
Compare
Signed-off-by: Joas Schilling <coding@schilljs.com>
37154e2
to
693a81b
Compare
/backport to stable29 |
Todo
Checklist