diff --git a/apps/syndie/java/src/net/i2p/syndie/PetName.java b/apps/syndie/java/src/net/i2p/syndie/PetName.java index a6c42e9da5000be7b5e65b7fb996ba3ec9a53b1c..c63d1498791242b3c8752dcded7e63f766118704 100644 --- a/apps/syndie/java/src/net/i2p/syndie/PetName.java +++ b/apps/syndie/java/src/net/i2p/syndie/PetName.java @@ -76,15 +76,11 @@ public class PetName { _groups.add(gtok.nextToken().trim()); s = tok.nextToken(); // skip past the : } - if (tok.hasMoreTokens()) { - s = tok.nextToken(); - if (":".equals(s)) { - _location = null; - } else { - _location = s; - } - } else { - _location = null; + while (tok.hasMoreTokens()) { + if (_location == null) + _location = tok.nextToken(); + else + _location = _location + tok.nextToken(); } } @@ -161,15 +157,16 @@ public class PetName { } public static void main(String args[]) { - test("a:b:c:d:e:f"); - test("a:::::d"); - test("a:::::"); - test("a:b::::"); - test(":::::"); + test("a:b:c:true:e:f"); + test("a:::true::d"); + test("a:::true::"); + test("a:b::true::"); + test(":::trye::"); + test("a:b:c:true:e:http://foo.bar"); } private static void test(String line) { PetName pn = new PetName(line); String val = pn.toString(); - System.out.println("OK? " + val.equals(line) + ": " + line); + System.out.println("OK? " + val.equals(line) + ": " + line + " [" + val + "]"); } } diff --git a/apps/syndie/java/src/net/i2p/syndie/User.java b/apps/syndie/java/src/net/i2p/syndie/User.java index b4f435c50c7b31b85767332e179ece8d81be16e5..9bb1279e1a082a90e609dc108d53f334112d4c40 100644 --- a/apps/syndie/java/src/net/i2p/syndie/User.java +++ b/apps/syndie/java/src/net/i2p/syndie/User.java @@ -98,7 +98,8 @@ public class User { public PetNameDB getPetNameDB() { return _petnames; } public void invalidate() { - BlogManager.instance().saveUser(this); + if (_authenticated) + BlogManager.instance().saveUser(this); init(); }