Modify ↓
Ticket #1862 (closed defect: fixed)
Opened 7 years ago
Last modified 6 years ago
[PATCH] header_logo width/height bug
| Reported by: | ndelon@… | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | low | Milestone: | 0.9 |
| Component: | general | Version: | devel |
| Severity: | trivial | Keywords: | header_logo width height |
| Cc: | |||
| Release Notes: | |||
| API 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
Change History
comment:1 Changed 7 years ago by anonymous
- Summary changed from header_logo width/height bug to [PATCH] header_logo width/height bug
comment:2 Changed 6 years ago by cmlenz
- Owner changed from jonas to cmlenz
- Status changed from new to assigned
comment:3 Changed 6 years ago by cmlenz
- Resolution set to fixed
- Status changed from assigned to closed
Note: See
TracTickets for help on using
tickets.



Fixed in [2124].