Edgewall Software

Ticket #1862 (closed defect: fixed)

Opened 4 years ago

Last modified 4 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:

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

Changed 4 years ago by anonymous

  • summary changed from header_logo width/height bug to [PATCH] header_logo width/height bug

Changed 4 years ago by cmlenz

  • owner changed from jonas to cmlenz
  • status changed from new to assigned

Changed 4 years ago by cmlenz

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in [2124].

Add/Change #1862 ([PATCH] header_logo width/height bug)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cmlenz. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.