Ticket #1862 (closed defect: fixed)
[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: |
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
Note: See
TracTickets for help on using
tickets.


