/** The logger. */
private static final Logger logger = getLogger("Sone.UpdateChecker");
- /** The key of the Sone homepage. */
- private static final String SONE_HOMEPAGE = "USK@nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI,DuQSUZiI~agF8c-6tjsFFGuZ8eICrzWCILB60nT8KKo,AQACAAE/sone/";
-
- /** The current latest known edition. */
- private static final int LATEST_EDITION = 65;
-
/** The event bus. */
private final EventBus eventBus;
*/
public void start() {
try {
- currentUri = new FreenetURI(SONE_HOMEPAGE + LATEST_EDITION);
+ currentUri = new FreenetURI(SonePlugin.getHomepage());
} catch (MalformedURLException mue1) {
/* this can not really happen unless I screw up. */
logger.log(Level.SEVERE, "Sone Homepage URI invalid!", mue1);
/** The current year at time of release. */
private static final int YEAR = 2015;
+ private static final String SONE_HOMEPAGE = "USK@nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI,DuQSUZiI~agF8c-6tjsFFGuZ8eICrzWCILB60nT8KKo,AQACAAE/sone/";
+ private static final int LATEST_EDITION = 65;
/** The logger. */
private static final Logger logger = getLogger("Sone.Plugin");
return YEAR;
}
+ public static String getHomepage() {
+ return SONE_HOMEPAGE + LATEST_EDITION;
+ }
+
//
// FREDPLUGIN METHODS
//
private final Version version;
private final int year;
+ private final String homepage;
- public AboutPage(Template template, WebInterface webInterface, Version version, int year) {
+ public AboutPage(Template template, WebInterface webInterface, Version version, int year, String homepage) {
super("about.html", template, "Page.About.Title", webInterface, false);
this.version = version;
this.year = year;
+ this.homepage = homepage;
}
@Override
super.processTemplate(request, templateContext);
templateContext.set("version", version);
templateContext.set("year", year);
+ templateContext.set("homepage", homepage);
}
}
pageToadlets.add(pageToadletFactory.createPageToadlet(new LogoutPage(emptyTemplate, this), "Logout"));
pageToadlets.add(pageToadletFactory.createPageToadlet(new OptionsPage(optionsTemplate, this), "Options"));
pageToadlets.add(pageToadletFactory.createPageToadlet(new RescuePage(rescueTemplate, this), "Rescue"));
- pageToadlets.add(pageToadletFactory.createPageToadlet(new AboutPage(aboutTemplate, this, SonePlugin.VERSION, SonePlugin.getYear()), "About"));
+ pageToadlets.add(pageToadletFactory.createPageToadlet(new AboutPage(aboutTemplate, this, SonePlugin.VERSION, SonePlugin.getYear(), SonePlugin.getHomepage()), "About"));
pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("noPermission.html", noPermissionTemplate, "Page.NoPermission.Title", this)));
pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("emptyImageTitle.html", emptyImageTitleTemplate, "Page.EmptyImageTitle.Title", this)));
pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("emptyAlbumTitle.html", emptyAlbumTitleTemplate, "Page.EmptyAlbumTitle.Title", this)));
<h2><%= Page.About.Homepage.Title|l10n|html></h2>
<p>
- <%= Page.About.Homepage.Description|l10n|html|replace needle=="{link}" replacement=='<a href="/USK@nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI,DuQSUZiI~agF8c-6tjsFFGuZ8eICrzWCILB60nT8KKo,AQACAAE/sone/49/">'|replace needle=="{/link}" replacement=='</a>'>
+ <%= Page.About.Homepage.Description|l10n|html|replace needle=="{link}" replacement=='<a href="/<% homepage|html>/">'|replace needle=="{/link}" replacement=='</a>'>
</p>
<h2><%= Page.About.License.Title|l10n|html></h2>