Various issues with FlogHelper. IMHO the NoSuchElementException needs to be
resolved before we deploy the plugin jar, much of the rest is either outdated
or can wait. This was reviewed from plugin-FlogHelper-staging and pushed to
plugin-FlogHelper-official.
SyncPluginTalker: sleep for 15ms????
2dd669c558761df5b95ed02eca958bf59e805ee5 :
- final HTMLNode authorsBox = new HTMLNode("select", new
String[]{"id", "name"}, new String[]{"DefaultAuthor", "DefaultAuthor"});
+ final HTMLNode authorsBox = new HTMLNode("select", new
String[]{"id", "name"}, new String[]{"DefaultAuthorFieldDesc",
"DefaultAuthor"});
wrong way around, surely?
f21c8c0ead976ce03b2798c5b4762b8b930d464f
Activelink.getByteArrayFromUploadedFile: isn't there BucketTools.toByteArray or
something?
ImportFlogToadlet.getPagePost(): read() won't necessarily fill the buffer, use
BucketTools.toByteArray or DataInputStream.readFully().
reviewed up to b474174ec9c45b210fa41acb8b554b60c6361591
SyntaxElement.htmlSpecialChars
- can't use freenet.support.HTMLEncoder?
YAWKL: Isn't .+? == .*
+ SyntaxElement.begin +
"((.+?)\\.(jpe?g|png|gif|svg|bmp|tiff?))" + SyntaxElement.end,
- is this valid? I always thought you needed brackets inside the |'s?
JavascriptFactoryToadlet (and probably elsewhere): getPageGet: don't use
String.getBytes() ever! Use getBytes("UTF-8") and specify the charset.
request.getPartAsString(blah, limit) - if you specify a limit, always specify
it in the html responsible for the form as well. If we go over the limit it
silently fails!
reviewed up to:
0fc8a72706d48a461c8072fb8fa28921998836bf
CreateOrEditContentToadlet.java
+ final String[] sTags = new String[tags.size()];
+ for(int i = 0; i < sTags.length; ++i) {
+ sTags[i] = tags.elementAt(i);
+ }
-> tags.toArray(new String[tags.size()]);
b3db2cb02170b9f255bd91991177cef8bf600a58:
InsertPluginStoreDump not actually used, correct?
620e373b88d5e2b37186e06c64acb7d87b365505
DataFormatter.tryParseLong
- use Fields.parseLong
+ mainContent.append("<a
href=\"./Content-").append(content.strings.get("ID")).append(".html\">Permanent
link</a> | <a
href=\"./Content-").append(content.strings.get("ID")).append(".html#comments\">Comments</a>
| Tags : ");
- localise these strings! also in getTagsPage, makePagination and probably
elsewhere.
Should be a warning on the import page: importing other people's flog backups
can be dangerous, as they can put arbitrary tags (e.g. webbugs) on your preview
page.
- Maybe that isn't true with all the escaping now?
build.xml:
<property name="freenetjar" value="../fred/freenet-cvs-snapshot.jar"/>
+ <property name="freenet-extjar" value="../fred/freenet-ext.jar"/>
../fred/lib/
FlogFactory:
+ name = "Tag-" + tag + "-p" + Long.toString(i) +
".html";
+ fileMap.put(name, new ManifestElement(name,
data, DefaultMIMETypes.guessMIMEType(name, true), data.size()));
Why guessMIMEType()?! You know it's HTML, for almost all of these!
Please don't use RequestStarter.MAXIMUM_PRIORITY_CLASS even for inserts,
especially if persistent. I suggest IMMEDIATE_SPLITFILE_PRIORITY_CLASS.
+ "/?newbookmark=USK@" +
WoTOwnIdentities.getRequestURI(this.flog.strings.get("Author")).split("@")[1].split("/")[0]
+ "/" + this.flog.strings.get("SSKPath") + "/-1/&desc=" +
this.flog.strings.get("Title"), "Bookmark this flog"
- does bookmark this flog work with a negative edition number? if you use 0 it
will bookmark it with the edition used to fetch the page...
- <!-- TODO show the activelink here if any -->
- <!-- TODO "About the author" -->
+ <h4>About the author</h4>
- and others - these should be l10n'ed.
attachment has only one "e" - the classes have been changed but not the
properties, any chance of changing it and maybe auto-migrating?
+ form.addChild("p",
FlogHelper.getBaseL10n().getString("ReallyDeleteAttachementLong").replace("${AttachementName}",
nameToDelete));
Most of freenet uses: getString("ReallyDeleteAttachementLong",
"AttachementName", nameToDelete)
ContentListToadlet
+ if(content.strings.get("ID").length() != 7) continue;
huh?
do we actually call putStore() in all paths where we modify stuff?
COPYING: Any particular reason you are using LGPL? If your headers say GPL2+
you should include the GPL2, not the LGPL2.1.
Should probably have a menu...
+ /**
+ * Override L10n files are stored on the disk, their names should be
explicit
+ * we put here the plugin name, and the "override" indication. Plugin
L10n
+ * override is not implemented in the node yet.
Is it implemented now? It would seem essential for the translation page?
+ mainContent.append("<br /><small>Last
modification : " +
+ mainContent.append("<br /><small>Creation date :
").append(
- l10n
+ template = template.replace("{AdditionnalMenuContent}", ""); //
FIXME that might have a use later
(and the corresponding part of the template) : "additional"
DataFormatter.getMD5()
- Can't we use HexUtil.bytesToHex?
IndexBuilder.findAllWordPositions
- positions are specified in word index, not in bytes/characters.
readStringFromStream
- need to specify charset to InputStreamReader
Catching NullPointerException's is bad.
Re detecting that there is no db4o:
- You could use a display callback to not show the plugin menu until the
database has been loaded (usually this means the node is waiting for the user
to enter the password)?
71b3364f6db61c84a713cc045d7fcf96a575e98f
- why are we no longer escaping stuff here?
Version.java : use a simple version number for the RealVersion please, I know
we create it from major/minor in some other plugins, but we need to move away
from that to make plugin auto-update work well.
/me created a test flog, and tried to insert it, and:
Internal error: please report
java.util.NoSuchElementException
at java.util.TreeMap.key(TreeMap.java:1206)
at java.util.TreeMap.lastKey(TreeMap.java:274)
at
plugins.floghelper.ui.flog.FlogFactory.getAtomFeed(FlogFactory.java:592)
at
plugins.floghelper.ui.flog.FlogFactory.parseAllFlog(FlogFactory.java:325)
at plugins.floghelper.ui.flog.FlogFactory.insert(FlogFactory.java:402)
at
plugins.floghelper.ui.FlogListToadlet.getPagePost(FlogListToadlet.java:210)
at
plugins.floghelper.ui.FlogHelperToadlet.handleMethodPOST(FlogHelperToadlet.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
freenet.clients.http.ToadletContextImpl.handle(ToadletContextImpl.java:504)
at
freenet.clients.http.SimpleToadletServer$SocketHandler.run(SimpleToadletServer.java:751)
at
freenet.support.PooledExecutor$MyThread.realRun(PooledExecutor.java:227)
at freenet.support.io.NativeThread.run(NativeThread.java:101)
Apart from that, the UI is rather complex, IMHO a lot of it should only show in
advanced mode.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20091126/860e74b9/attachment.pgp>