Modify ↓
Opened 19 years ago
Closed 19 years ago
#1862 closed defect (fixed)
[PATCH] header_logo width/height bug
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | low | Milestone: | 0.9 |
Component: | general | Version: | devel |
Severity: | trivial | Keywords: | header_logo width height |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
When the src field of the [header_logo] trac.ini section is set but no width/height are given, the width/height from trac_banner.png are used.
It can be fixed by calling the get method of trac.config.Configuration with the default parameter set to "" (empty string) instead of None, so that the default value stored in trac.db_default won't be used.
Here is the patch:
=== trac/web/chrome.py ================================================================== --- trac/web/chrome.py (revision 33) +++ trac/web/chrome.py (local) @@ -211,8 +211,8 @@ req.hdf['chrome.logo'] = { 'link': logo_link, 'src': logo_src, 'src_abs': logo_src_abs, 'alt': util.escape(self.config.get('header_logo', 'alt')), - 'width': self.config.get('header_logo', 'width') or None, - 'height': self.config.get('header_logo', 'height') or None + 'width': self.config.get('header_logo', 'width', '') or None, + 'height': self.config.get('header_logo', 'height', '') or None } else: req.hdf['chrome.logo.link'] = logo_link
Attachments (0)
Change History (3)
comment:1 by , 19 years ago
Summary: | header_logo width/height bug → [PATCH] header_logo width/height bug |
---|
comment:2 by , 19 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in [2124].