Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#1862 closed defect (fixed)

[PATCH] header_logo width/height bug

Reported by: ndelon@… 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 anonymous, 19 years ago

Summary: header_logo width/height bug[PATCH] header_logo width/height bug

comment:2 by Christopher Lenz, 19 years ago

Owner: changed from Jonas Borgström to Christopher Lenz
Status: newassigned

comment:3 by Christopher Lenz, 19 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [2124].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.