Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Commit 47204ef

Browse files
authored
Merge pull request #13 from openkm/6.3-DEV
OpenKM 6.3.4 released
2 parents 77e4e1a + 27d7f90 commit 47204ef

18 files changed

Lines changed: 339 additions & 71 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ You can install OpenKM binaries from [SourceForge](https://sourceforge.net/proje
1717
* **OKMInstaller.jar**: The OpenKM installer assistant. Usage information at [using the installer](https://docs.openkm.com/kcenter/view/okm-6.3-com/using-the-installer.html).
1818
* **OpenKM-${Version}.zip**: Which just contains the OpenKM.war application without Tomcat and configuration
1919
files needed to get it running.
20-
20+
2121
## Installation wizard videos
2222
### Linux
2323
This video shows step by step the installation process of OpenKM Community version in Linux.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.openkm</groupId>
55
<artifactId>openkm</artifactId>
66
<packaging>war</packaging>
7-
<version>6.3.3</version>
7+
<version>6.3.4</version>
88
<name>OpenKM Web Application</name>
99
<url>http://www.openkm.com</url>
1010
<description>OpenKM is a powerful scalable Document Management System (DMS). OpenKM uses Tomcat + GWT + Hibernate open

src/main/java/com/openkm/core/Config.java

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@
2121

2222
package com.openkm.core;
2323

24+
import java.io.File;
25+
import java.io.FileInputStream;
26+
import java.io.FileNotFoundException;
27+
import java.io.IOException;
28+
import java.net.InetAddress;
29+
import java.util.*;
30+
import java.util.Map.Entry;
31+
32+
import javax.servlet.ServletContext;
33+
34+
import org.apache.lucene.util.Version;
35+
import org.slf4j.Logger;
36+
import org.slf4j.LoggerFactory;
37+
2438
import com.openkm.bean.ConfigStoredFile;
2539
import com.openkm.dao.ConfigDAO;
2640
import com.openkm.dao.SearchDAO;
@@ -32,21 +46,6 @@
3246
import com.openkm.util.FormatUtil;
3347
import com.openkm.validator.password.NoPasswordValidator;
3448
import com.openkm.vernum.MajorMinorVersionNumerationAdapter;
35-
import org.apache.lucene.util.Version;
36-
import org.slf4j.Logger;
37-
import org.slf4j.LoggerFactory;
38-
39-
import javax.servlet.ServletContext;
40-
import java.io.File;
41-
import java.io.FileInputStream;
42-
import java.io.FileNotFoundException;
43-
import java.io.IOException;
44-
import java.net.InetAddress;
45-
import java.util.ArrayList;
46-
import java.util.List;
47-
import java.util.Map.Entry;
48-
import java.util.Properties;
49-
import java.util.TreeMap;
5049

5150
public class Config {
5251
private static Logger log = LoggerFactory.getLogger(Config.class);
@@ -344,6 +343,12 @@ public class Config {
344343
public static final String PROPERTY_UNIT_TESTING_PASSWORD = "unit.testing.password";
345344
public static final String PROPERTY_UNIT_TESTING_FOLDER = "unit.testing.folder";
346345

346+
// Rss news
347+
public static String PROPERTY_RSS_NEWS = "rss.news";
348+
public static String PROPERTY_RSS_NEWS_BOX_WIDTH = "rss.news.box.width";
349+
public static String PROPERTY_RSS_NEWS_MAX_SIZE = "rss.news.max.size";
350+
public static String PROPERTY_RSS_NEWS_VISIBLE = "rss.news.visible";
351+
347352
/**
348353
* Default values
349354
*/
@@ -630,6 +635,12 @@ public class Config {
630635
public static String UNIT_TESTING_PASSWORD = "admin";
631636
public static String UNIT_TESTING_FOLDER = "/okm:root/okmTesting";
632637

638+
// OpenKM RSS news
639+
public static boolean RSS_NEWS = true;
640+
public static int RSS_NEWS_BOX_WIDTH = 300;
641+
public static int RSS_NEWS_MAX_SIZE = 10;
642+
public static int RSS_NEWS_VISIBLE = 1;
643+
633644
// Misc
634645
public static int SESSION_EXPIRATION = 1800; // 30 mins (session.getMaxInactiveInterval())
635646
public static String LIST_SEPARATOR = ";";
@@ -1172,6 +1183,12 @@ public static void reload(ServletContext sc, Properties cfg) {
11721183
SECURITY_EXTENDED_MASK = ConfigDAO.getInteger(PROPERTY_SECURITY_EXTENDED_MASK, Integer.valueOf(cfg.getProperty(PROPERTY_SECURITY_EXTENDED_MASK, String.valueOf(SECURITY_EXTENDED_MASK))));
11731184
values.put(PROPERTY_SECURITY_EXTENDED_MASK, Integer.toString(SECURITY_EXTENDED_MASK));
11741185

1186+
// RSS news
1187+
RSS_NEWS = ConfigDAO.getBoolean(PROPERTY_RSS_NEWS, RSS_NEWS);
1188+
RSS_NEWS_BOX_WIDTH = ConfigDAO.getInteger(PROPERTY_RSS_NEWS_BOX_WIDTH, RSS_NEWS_BOX_WIDTH);
1189+
RSS_NEWS_MAX_SIZE = ConfigDAO.getInteger(PROPERTY_RSS_NEWS_MAX_SIZE, RSS_NEWS_MAX_SIZE);
1190+
RSS_NEWS_VISIBLE = ConfigDAO.getInteger(PROPERTY_RSS_NEWS_VISIBLE, RSS_NEWS_VISIBLE);
1191+
11751192
for (Entry<String, String> entry : values.entrySet()) {
11761193
log.info("RELOAD - {}={}", entry.getKey(), entry.getValue());
11771194
}

src/main/java/com/openkm/frontend/client/util/Util.java

Lines changed: 36 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121

2222
package com.openkm.frontend.client.util;
2323

24+
import java.util.List;
25+
import java.util.Map;
26+
2427
import com.google.gwt.core.client.GWT;
2528
import com.google.gwt.event.dom.client.KeyUpEvent;
2629
import com.google.gwt.http.client.URL;
@@ -33,9 +36,6 @@
3336
import com.openkm.frontend.client.service.OKMGeneralService;
3437
import com.openkm.frontend.client.service.OKMGeneralServiceAsync;
3538

36-
import java.util.List;
37-
import java.util.Map;
38-
3939
/**
4040
* Util
4141
*
@@ -567,47 +567,39 @@ public static native void resizeSwfViewer(String width, String height) /*-{
567567
obj.height = height;
568568
}-*/;
569569

570-
public static native void createPDFViewerFlexPaper(String pdfUrl, String width, String height, String printEnabled) /*-{
571-
if (printEnabled == 'true') {
572-
fpViewer = "../js/flexpaper/FlexPaperViewer.swf";
573-
} else {
574-
fpViewer = "../js/flexpaper/FlexPaperViewerRO.swf";
575-
}
576-
577-
pdfUrl = encodeURIComponent(pdfUrl);
578-
$wnd.swfobject.embedSWF(fpViewer, "pdfviewercontainer", width, height, "10.0.0", "playerProductInstall.swf",
579-
{
580-
SwfFile: pdfUrl,
581-
Scale: 0.6,
582-
ZoomTransition: "easeOut",
583-
ZoomTime: 0.5,
584-
ZoomInterval: 0.1,
585-
FitPageOnLoad: false,
586-
FitWidthOnLoad: true,
587-
PrintEnabled: printEnabled,
588-
FullScreenAsMaxWindow: false,
589-
ProgressiveLoading: true,
590-
591-
// PrintToolsVisible : printEnabled,
592-
ViewModeToolsVisible: true,
593-
ZoomToolsVisible: true,
594-
FullScreenVisible: true,
595-
NavToolsVisible: true,
596-
CursorToolsVisible: true,
597-
SearchToolsVisible: true,
598-
localeChain: "en_US"
599-
},
600-
{
601-
quality: "high",
602-
bgcolor: "#ffffff",
603-
allowscriptaccess: "sameDomain",
604-
allowfullscreen: "true"
605-
},
606-
{
607-
id: "FlexPaperViewer",
608-
name: "FlexPaperViewer"
609-
});
610-
}-*/;
570+
public static native void createPDFViewerFlexPaper(String pdfUrl, String width, String height) /*-{
571+
fpViewer = "../js/flexpaper/FlexPaperViewer.swf";
572+
pdfUrl = encodeURIComponent(pdfUrl);
573+
$wnd.swfobject.embedSWF(fpViewer, "pdfviewercontainer", width, height, "10.0.0", "playerProductInstall.swf",
574+
{
575+
SwfFile : pdfUrl,
576+
Scale : 0.6,
577+
ZoomTransition : "easeOut",
578+
ZoomTime : 0.5,
579+
ZoomInterval : 0.1,
580+
FitPageOnLoad : false,
581+
FitWidthOnLoad : true,
582+
FullScreenAsMaxWindow : false,
583+
ProgressiveLoading : true,
584+
ViewModeToolsVisible : true,
585+
ZoomToolsVisible : true,
586+
FullScreenVisible : true,
587+
NavToolsVisible : true,
588+
CursorToolsVisible : true,
589+
SearchToolsVisible : true,
590+
localeChain: "en_US"
591+
},
592+
{
593+
quality : "high",
594+
bgcolor : "#ffffff",
595+
allowscriptaccess : "sameDomain",
596+
allowfullscreen : "true"
597+
},
598+
{
599+
id : "FlexPaperViewer",
600+
name : "FlexPaperViewer"
601+
});
602+
}-*/;
611603

612604
public static native void resizePDFViewerFlexPaper(String width, String height) /*-{
613605
obj = $wnd.swfobject.getObjectById('FlexPaperViewer');

src/main/java/com/openkm/frontend/client/widget/properties/Preview.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121

2222
package com.openkm.frontend.client.widget.properties;
2323

24+
import java.util.ArrayList;
25+
import java.util.List;
26+
2427
import com.google.gwt.event.dom.client.ClickEvent;
2528
import com.google.gwt.event.dom.client.ClickHandler;
2629
import com.google.gwt.http.client.URL;
@@ -31,9 +34,6 @@
3134
import com.openkm.frontend.client.extension.widget.preview.PreviewExtension;
3235
import com.openkm.frontend.client.util.Util;
3336

34-
import java.util.ArrayList;
35-
import java.util.List;
36-
3737
/**
3838
* Notes
3939
*
@@ -171,9 +171,9 @@ public void showEmbedSWF(String uuid) {
171171

172172
if (Main.get().workspaceUserProperties.getWorkspace().getPreviewer().equals("flexpaper")) {
173173
if (Main.get().workspaceUserProperties.getWorkspace().isPrintPreview()) {
174-
Util.createPDFViewerFlexPaper(url, "" + width, "" + height, "true");
174+
Util.createPDFViewerFlexPaper(url, "" + width, "" + height);
175175
} else {
176-
Util.createPDFViewerFlexPaper(url, "" + width, "" + height, "false");
176+
Util.createPDFViewerFlexPaper(url, "" + width, "" + height);
177177
}
178178
}
179179

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/**
2+
* OpenKM, Open Document Management System (http://www.openkm.com)
3+
* Copyright (c) 2006-2017 Paco Avila & Josep Llort
4+
* <p>
5+
* No bytes were intentionally harmed during the development of this application.
6+
* <p>
7+
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
8+
* License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
9+
* version.
10+
* <p>
11+
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
12+
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13+
* <p>
14+
* You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
15+
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16+
*/
17+
18+
package com.openkm.servlet;
19+
20+
import com.ibm.icu.util.Calendar;
21+
import com.openkm.core.Config;
22+
import org.apache.commons.io.IOUtils;
23+
import org.slf4j.Logger;
24+
import org.slf4j.LoggerFactory;
25+
26+
import javax.servlet.ServletException;
27+
import javax.servlet.annotation.WebServlet;
28+
import javax.servlet.http.HttpServlet;
29+
import javax.servlet.http.HttpServletRequest;
30+
import javax.servlet.http.HttpServletResponse;
31+
import java.io.ByteArrayInputStream;
32+
import java.io.IOException;
33+
import java.io.InputStream;
34+
import java.io.PrintWriter;
35+
import java.net.URL;
36+
import java.nio.charset.StandardCharsets;
37+
38+
/**
39+
* Rss Servlet
40+
*/
41+
@WebServlet("/Rss")
42+
public class RssServlet extends HttpServlet {
43+
private static Logger log = LoggerFactory.getLogger(RssServlet.class);
44+
private static final long serialVersionUID = 1L;
45+
private static String date = "";
46+
private static String rssData = "";
47+
48+
@Override
49+
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
50+
request.setCharacterEncoding("UTF-8");
51+
InputStream rss = null;
52+
InputStream is = null;
53+
54+
try {
55+
// Only refresh RSS one time per day
56+
Calendar cal = Calendar.getInstance();
57+
String today = String.valueOf(cal.get(Calendar.YEAR)) + String.valueOf(cal.get(Calendar.MONTH) + 1) + String.valueOf(cal.get(Calendar.DATE));
58+
59+
if (date.isEmpty() || !date.equals(today)) {
60+
date = today;
61+
rss = new URL("https://www.openkm.com/news.rss?ver=com&limit=" + Config.RSS_NEWS_MAX_SIZE).openStream();
62+
rssData = IOUtils.toString(rss);
63+
log.debug("Remote RSS News\n" + rssData);
64+
}
65+
66+
is = new ByteArrayInputStream(rssData.getBytes(StandardCharsets.UTF_8));
67+
response.setContentType("text/xml; charset=UTF-8");
68+
response.setHeader("Content-type", "application/xhtml+xml");
69+
PrintWriter out = response.getWriter();
70+
IOUtils.copy(is, out);
71+
out.close();
72+
} catch (Exception e) {
73+
log.warn(e.getMessage(), e);
74+
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
75+
} finally {
76+
IOUtils.closeQuietly(rss);
77+
IOUtils.closeQuietly(is);
78+
}
79+
}
80+
}

src/main/webapp/WEB-INF/web.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
2+
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
4+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
55
<display-name>OpenKM</display-name>
66

77
<!-- Tomcat resources -->

src/main/webapp/css/login.css

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3171,4 +3171,65 @@ only screen and (-o-min-device-pixel-ratio: 3/2),
31713171
only screen and (min-device-pixel-ratio: 1.5) {
31723172
/* If you used a CSS img background, you can put your high resolution here */
31733173

3174+
}
3175+
3176+
/*
3177+
=================================================================
3178+
OpenKM RSS
3179+
=================================================================
3180+
*/
3181+
.openkm-news {
3182+
width:200px;
3183+
position:fixed;
3184+
top:0px;
3185+
left:0px;
3186+
z-index:1;
3187+
}
3188+
3189+
.openkm-version {
3190+
padding: 5px 20px;
3191+
color: #404040;
3192+
font-weight: bold;
3193+
background:#fed400;
3194+
}
3195+
3196+
.openkm-sticker {
3197+
position:absolute;
3198+
top: 5px;
3199+
right: 5px;
3200+
z-index:2;
3201+
}
3202+
3203+
.openkm-sticker img {
3204+
padding: 0px 5px;
3205+
}
3206+
3207+
.vticket-border-right {
3208+
border-right: 1px solid #394263;
3209+
}
3210+
3211+
.vticker {
3212+
border-left: 1px solid #394263;
3213+
border-right: 1px solid #394263;
3214+
border-bottom: 1px solid #394263;
3215+
background: white;
3216+
position: relative;
3217+
top: 0px;
3218+
left: 0px;
3219+
border-bottom-right-radius: 10px;
3220+
}
3221+
3222+
.vticker ul{
3223+
padding: 0;
3224+
}
3225+
3226+
.vticker li{
3227+
list-style: none;
3228+
border-bottom: 1px solid green;
3229+
padding: 10px;
3230+
}
3231+
3232+
.vticker h4 {
3233+
color: #0885bd;
3234+
font-weight: bold;
31743235
}

src/main/webapp/img/backward.png

244 Bytes
Loading
477 Bytes
Loading

0 commit comments

Comments
 (0)