Edgewall Software

Ticket #8444: plugin-panel-author-name.patch

File plugin-panel-author-name.patch, 1.7 KB (added by sebastian@…, 3 years ago)

Patch against Trac 0.11.x

  • trac/admin/web_ui.py

    old new  
    511511                            if k == 'home_page' or k == 'url': 
    512512                                k = 'home_page' 
    513513                                v = v.replace('$', '').replace('URL: ', '')  
    514                             info[k] = v 
     514                            if k == 'author': 
     515                                v = to_unicode(v) 
     516                             
     517                            info[k] = v 
     518                else: 
     519                    # Info found; set all those fields to "None" that have the  
     520                    # value "UNKNOWN" as this is value for fields that aren't 
     521                    # specified within "setup.py" 
     522                    for k in info: 
     523                        if info[k] == 'UNKNOWN': 
     524                            info[k] = None 
     525                        elif k == 'author': 
     526                            # Must be encoded as unicode as otherwise Genshi  
     527                            # may raise a "UnicodeDecodeError". 
     528                            info[k] = to_unicode(info[k]) 
     529 
    515530                # retrieve plugin version info 
    516531                version = dist.version 
    517532                if not version: 
  • trac/admin/templates/admin_plugins.html

    old new  
    6161              <dd> 
    6262                <a py:strip="not plugin.info.get('author_email')" 
    6363                   href="mailto:${plugin.info.author_email}"> 
    64                   ${plugin.info.author_email or plugin.info.author} 
     64                  ${plugin.info.author or plugin.info.author_email} 
    6565                </a> 
    6666              </dd> 
    6767            </py:if>