♻️ Turn plugin year into instance method
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 5 Mar 2019 09:59:46 +0000 (10:59 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 5 Mar 2019 14:20:57 +0000 (15:20 +0100)
src/main/java/net/pterodactylus/sone/main/SonePlugin.java
src/main/java/net/pterodactylus/sone/web/WebInterface.java

index 54e219f..82a0217 100644 (file)
@@ -178,7 +178,7 @@ public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr
                return (version == null) ? "unknown" : version.getNice();
        }
 
-       public static int getYear() {
+       public int getYear() {
                return YEAR;
        }
 
index b9faa86..92e5034 100644 (file)
@@ -753,7 +753,7 @@ public class WebInterface implements SessionProvider {
                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, new PluginVersion(SonePlugin.getPluginVersion()), new PluginYear(SonePlugin.getYear()), new PluginHomepage(SonePlugin.getHomepage())), "About"));
+               pageToadlets.add(pageToadletFactory.createPageToadlet(new AboutPage(aboutTemplate, this, new PluginVersion(SonePlugin.getPluginVersion()), new PluginYear(sonePlugin.getYear()), new PluginHomepage(SonePlugin.getHomepage())), "About"));
                pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("noPermission.html", this, noPermissionTemplate, "Page.NoPermission.Title")));
                pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("emptyImageTitle.html", this, emptyImageTitleTemplate, "Page.EmptyImageTitle.Title")));
                pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("emptyAlbumTitle.html", this, emptyAlbumTitleTemplate, "Page.EmptyAlbumTitle.Title")));