Skip to content

Commit f84cbfc

Browse files
committed
Put OnlyOffice button in toolbar
1 parent 77f552b commit f84cbfc

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

logicaldoc-core/src/main/java/com/logicaldoc/core/security/SessionManager.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -444,10 +444,10 @@ public Session getSession(HttpServletRequest request) {
444444
* Gets the Session ID specification from the current request following this
445445
* lookup strategy:
446446
* <ol>
447-
* <li>Session attribute <code>PARAM_SID</code></li>
448-
* <li>Request attribute <code>PARAM_SID</code></li>
449447
* <li>Request parameter <code>PARAM_SID</code></li>
450448
* <li>Request header <code>PARAM_SID</code></li>
449+
* <li>Request attribute <code>PARAM_SID</code></li>
450+
* <li>Session attribute <code>PARAM_SID</code></li>
451451
* <li>Cookie <code>COOKIE_SID</code></li>
452452
* <li>Spring SecurityContextHolder</li>
453453
* <li>Client ID</li>
@@ -481,20 +481,20 @@ private String getSessionIdFromRequest(HttpServletRequest request) {
481481
return null;
482482

483483
String sid = null;
484-
if (request.getSession(true).getAttribute(PARAM_SID) != null
485-
&& StringUtils.isNotEmpty((String) request.getSession(true).getAttribute(PARAM_SID)))
486-
sid = (String) request.getSession(true).getAttribute(PARAM_SID);
487-
else if (request.getAttribute(PARAM_SID) != null
488-
&& StringUtils.isNotEmpty((String) request.getAttribute(PARAM_SID)))
489-
sid = (String) request.getAttribute(PARAM_SID);
490-
else if (StringUtils.isNotEmpty(request.getParameter(PARAM_SID))
484+
if (StringUtils.isNotEmpty(request.getParameter(PARAM_SID))
491485
&& Context.get().getProperties().getBoolean("security.acceptsid", false))
492486
sid = request.getParameter(PARAM_SID);
493487
else if (StringUtils.isNotEmpty(request.getHeader(PARAM_SID)))
494488
sid = request.getHeader(PARAM_SID);
495-
else {
489+
else if (request.getAttribute(PARAM_SID) != null
490+
&& StringUtils.isNotEmpty((String) request.getAttribute(PARAM_SID)))
491+
sid = (String) request.getAttribute(PARAM_SID);
492+
else if (request.getSession(true).getAttribute(PARAM_SID) != null
493+
&& StringUtils.isNotEmpty((String) request.getSession(true).getAttribute(PARAM_SID)))
494+
sid = (String) request.getSession(true).getAttribute(PARAM_SID);
495+
else
496496
sid = getSessionIdFromCookie(request);
497-
}
497+
498498
return sid;
499499
}
500500

logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/DocumentToolbar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ private void addOnlyOffice() {
486486
if (Feature.visible(Feature.ONLYOFFICE) && Menu.enabled(Menu.ONLYOFFICE)) {
487487
addButton(onlyoffice);
488488
onlyoffice.setTooltip(I18N.message("editwithonlyoffice"));
489-
onlyoffice.setTitle("<i class='fab fa-briefcase fa-lg fa-lg' aria-hidden='true'></i>");
489+
onlyoffice.setTitle("<i class='fal fa-briefcase fa-lg fa-lg' aria-hidden='true'></i>");
490490
if (!Feature.enabled(Feature.OFFICE))
491491
setFeatureDisabled(office);
492492

logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/impex/syndication/SyndicationStandardProperties.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ private void refresh() {
116116
hiddenApiKey, changedHandler);
117117
apiKey.addChangedHandler(changedHandler);
118118

119-
GuiLog.info("key: " + syndication.getApiKey());
120-
121119
TextItem include = ItemFactory.newTextItem("include", syndication.getIncludes());
122120
include.addChangedHandler(changedHandler);
123121

0 commit comments

Comments
 (0)