From 08fb30378a2f19a336b640e03ce54469f2113e93 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 17 Aug 2015 11:31:31 -0400 Subject: [PATCH] Closes #3302 - Fixes issue where the served path for the favicon was incorrect (included relative path when one was not needed) - Also fixes issue where favicons were just plain not served for subfolder installations - Fixed unsemantic HTML in ACP/General regarding Site Logo and Favicon fieldsets --- src/controllers/admin/uploads.js | 2 +- src/middleware/index.js | 2 +- src/views/admin/settings/general.tpl | 37 ++++++++++++++++++---------- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/src/controllers/admin/uploads.js b/src/controllers/admin/uploads.js index 88509df0a0..8cdf5f81f3 100644 --- a/src/controllers/admin/uploads.js +++ b/src/controllers/admin/uploads.js @@ -38,7 +38,7 @@ uploadsController.uploadFavicon = function(req, res, next) { return next(err); } - res.json([{name: uploadedFile.name, url: nconf.get('relative_path') + image.url}]); + res.json([{name: uploadedFile.name, url: image.url}]); }); } }; diff --git a/src/middleware/index.js b/src/middleware/index.js index c7358ca5ac..51f7b10d05 100644 --- a/src/middleware/index.js +++ b/src/middleware/index.js @@ -22,7 +22,7 @@ var middleware = {}; function setupFavicon(app) { var faviconPath = path.join(__dirname, '../../', 'public', meta.config['brand:favicon'] ? meta.config['brand:favicon'] : 'favicon.ico'); if (fs.existsSync(faviconPath)) { - app.use(favicon(faviconPath)); + app.use(nconf.get('relative_path'), favicon(faviconPath)); } } diff --git a/src/views/admin/settings/general.tpl b/src/views/admin/settings/general.tpl index ae63b28cbf..9b3c0e73f2 100644 --- a/src/views/admin/settings/general.tpl +++ b/src/views/admin/settings/general.tpl @@ -31,25 +31,36 @@
Site Logo
-
- -
- -

- -
-
+
+ +
+ + + + +
+
+
+ + +

+ When the logo is clicked, send users to this address. If left blank, user will be sent to the forum index. +

+
Favicon
-
-
-
- -
+
+
+ + + + +
+