mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 23:45:45 +01:00
added logic for hiding logo if none is set, preventing crash on startup if no logo is set
This commit is contained in:
@@ -35,7 +35,7 @@ Emailer.registerApp = function (expressApp) {
|
|||||||
url: nconf.get('url'),
|
url: nconf.get('url'),
|
||||||
site_title: meta.config.title || 'NodeBB',
|
site_title: meta.config.title || 'NodeBB',
|
||||||
logo: {
|
logo: {
|
||||||
src: nconf.get('url') + meta.config['brand:logo'].replace('.png', '-x50.png'),
|
src: meta.config['brand:logo'] ? nconf.get('url') + meta.config['brand:logo'].replace('.png', '-x50.png') : null,
|
||||||
height: meta.config['brand:emailLogo:height'],
|
height: meta.config['brand:emailLogo:height'],
|
||||||
width: meta.config['brand:emailLogo:width'],
|
width: meta.config['brand:emailLogo:width'],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -172,7 +172,11 @@
|
|||||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 600px;">
|
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 600px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 20px 0; text-align: center">
|
<td style="padding: 20px 0; text-align: center">
|
||||||
|
<!-- IF logo.src -->
|
||||||
<img src="{logo.src}" height="{logo.height}" width="{logo.width}" alt="{site_title}" border="0" style="height: {logo.height}px; width: {logo.width}px; background: #222222; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555;">
|
<img src="{logo.src}" height="{logo.height}" width="{logo.width}" alt="{site_title}" border="0" style="height: {logo.height}px; width: {logo.width}px; background: #222222; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555;">
|
||||||
|
<!-- ELSE -->
|
||||||
|
|
||||||
|
<!-- ENDIF logo.src -->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user