Changeset c91f942


Ignore:
Timestamp:
Jun 4, 2017 1:01:09 AM (3 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
791bc9a
Parents:
66385c0
Message:

/netdb: Fix bug rendering the "Add to addressbook" link for local Destinations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/NetDbRenderer.java

    r66385c0 rc91f942  
    320320                else
    321321                    buf.append(dest.toBase64().substring(0, 6));
    322                 buf.append("</th></tr>\n<tr><td colspan=\"2\">");
     322                buf.append("</th></tr>\n<tr><td");
     323                // If the dest is published but not in the addressbook, an extra
     324                // <td> is appended with an "Add to addressbook" link, so this
     325                // <td> should not span 2 columns.
     326                String host = null;
     327                if (!unpublished) {
     328                    host = _context.namingService().reverseLookup(dest);
     329                }
     330                if (host != null) {
     331                    buf.append(" colspan=\"2\"");
     332                }
     333                buf.append(">");
    323334                String b32 = dest.toBase32();
    324335                buf.append("<a href=\"http://").append(b32).append("\">").append(b32).append("</a></td>");
    325336                if (!unpublished) {
    326                     String host = _context.namingService().reverseLookup(dest);
    327337                    if (host == null) {
    328338                        buf.append("<td class=\"addtobook\" colspan=\"2\">").append("<a title=\"").append(_t("Add to addressbook"))
Note: See TracChangeset for help on using the changeset viewer.