diff options
author | James Moger <james.moger@gitblit.com> | 2011-04-11 21:49:36 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-04-11 21:49:36 -0400 |
commit | bc10f9b3128f6d6986138914b3b53f5d974a2d09 (patch) | |
tree | c812ce17e751db2f7d86788ad24aa1c8440c0b63 /src/com/gitblit/wicket/panels/BasePanel.java | |
parent | 7d35e227475bb4a6ba185788cc663e38822c15f8 (diff) | |
download | gitblit-bc10f9b3128f6d6986138914b3b53f5d974a2d09.tar.gz gitblit-bc10f9b3128f6d6986138914b3b53f5d974a2d09.zip |
Eliminated most session usage.
Diffstat (limited to 'src/com/gitblit/wicket/panels/BasePanel.java')
-rw-r--r-- | src/com/gitblit/wicket/panels/BasePanel.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/com/gitblit/wicket/panels/BasePanel.java b/src/com/gitblit/wicket/panels/BasePanel.java new file mode 100644 index 00000000..f81dfa9f --- /dev/null +++ b/src/com/gitblit/wicket/panels/BasePanel.java @@ -0,0 +1,21 @@ +package com.gitblit.wicket.panels;
+
+import java.util.TimeZone;
+
+import org.apache.wicket.markup.html.panel.Panel;
+
+import com.gitblit.StoredSettings;
+import com.gitblit.wicket.GitBlitWebSession;
+
+public abstract class BasePanel extends Panel {
+
+ private static final long serialVersionUID = 1L;
+
+ public BasePanel(String wicketId) {
+ super(wicketId);
+ }
+
+ protected TimeZone getTimeZone() {
+ return StoredSettings.getBoolean("useClientTimezone", false) ? GitBlitWebSession.get().getTimezone() : TimeZone.getDefault();
+ }
+}
|