Changeset fbd7fee


Ignore:
Timestamp:
Dec 4, 2005 8:02:24 PM (15 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
5966fcf
Parents:
5faca98
git-author:
jrandom <jrandom> (12/04/05 20:02:24)
git-committer:
zzz <zzz@…> (12/04/05 20:02:24)
Message:

2005-12-04 jrandom

  • Bugfix in Syndie for a problem in the threaded indexer (thanks CofE!)
  • Always include ourselves in the favorite authors (since we don't bookmark ourselves)
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • apps/syndie/java/src/net/i2p/syndie/ArchiveIndexer.java

    r5faca98 rfbd7fee  
    8585                String entryTags[] = entry.getTags();
    8686                threads.addEntry(entry.getURI(), entryTags);
     87                log.debug("Adding entry " + entry.getURI() + " to the threads, with tag count " + (entryTags != null ? entryTags.length : 0));
    8788                for (int t = 0; t < entryTags.length; t++) {
    8889                    if (!tags.containsKey(entryTags[t])) {
     
    107108                    if ( (forceNewThread != null) && (Boolean.valueOf(forceNewThread).booleanValue()) ) {
    108109                        // ignore the parent
     110                        log.warn("Ignore the parent of " + entry.getURI() + ": " + reply);
    109111                    } else {
    110112                        BlogURI parent = new BlogURI(reply.trim());
  • apps/syndie/java/src/net/i2p/syndie/WritableThreadIndex.java

    r5faca98 rfbd7fee  
    3030    void addEntry(BlogURI entry, String tags[]) {
    3131        if (tags == null) tags = NO_TAGS;
    32         String oldTags[] = (String[])_tags.put(entry, tags);
     32        Object old = _tags.get(entry);
     33        if (old != null) {
     34            System.err.println("Old value: " + old + " new tags: " + tags + " entry: " + entry);
     35        } else {
     36            _tags.put(entry, tags);
     37        }
    3338    }
    3439   
     
    109114                node = node.getParent();
    110115       
    111             roots.add(node);
     116            if (!roots.contains(node)) {
     117                roots.add(node);
     118            }
    112119        }
    113120       
     
    155162                return -1;
    156163            } else if (l == r) {
    157                 return DataHelper.compareTo(left.getEntry().getKeyHash().getData(), right.getEntry().getKeyHash().getData());
     164                // ok, the newest responses match, so lets fall back and compare the roots themselves
     165                l = left.getEntry().getEntryId();
     166                r = right.getEntry().getEntryId();
     167                if (l > r) {
     168                    return -1;
     169                } else if (l == r) {
     170                    return DataHelper.compareTo(left.getEntry().getKeyHash().getData(), right.getEntry().getKeyHash().getData());
     171                } else {
     172                    return 1;
     173                }
    158174            } else {
    159175                return 1;
  • apps/syndie/java/src/net/i2p/syndie/web/ViewThreadedServlet.java

    r5faca98 rfbd7fee  
    8080                    }
    8181                }
     82                // always include ourselves...
     83                aindex.selectMatchesOrderByEntryId(rv, user.getBlog(), tags, dayBegin);
     84   
    8285                Collections.sort(rv, BlogURI.COMPARATOR);
    8386            } else {
  • history.txt

    r5faca98 rfbd7fee  
    1 $Id: history.txt,v 1.344 2005/12/03 14:03:46 jrandom Exp $
     1$Id: history.txt,v 1.345 2005/12/03 22:18:09 jrandom Exp $
     2
     32005-12-04  jrandom
     4    * Bugfix in Syndie for a problem in the threaded indexer (thanks CofE!)
     5    * Always include ourselves in the favorite authors (since we don't
     6      bookmark ourselves)
    27
    382005-12-03  jrandom
Note: See TracChangeset for help on using the changeset viewer.