aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-02 17:23:44 +0300
committerGravatar Vitaly Takmazov2016-11-02 17:23:44 +0300
commit38cf47b815f820d9745d7ede6b1f40811b98d52f (patch)
tree23df22f62208cc99f7776413d76c4d107a9eb1de
parente6e51acf09648ffb94eeecfa74a180e25b784e67 (diff)
parent38071510b3888f5a4edb31705953a0995256d882 (diff)
Merge branch 'master' of ssh://den.jabber.ru:2205/var/lib/git/com.juick.http.www
-rw-r--r--juick-api/build.gradle6
-rw-r--r--juick-core/build.gradle6
-rw-r--r--juick-core/src/main/java/com/juick/Message.java2
-rw-r--r--juick-demo/build.gradle6
-rw-r--r--juick-rss/build.gradle2
-rw-r--r--juick-ws/build.gradle8
-rw-r--r--juick-www/build.gradle10
-rw-r--r--juick-www/src/main/java/com/juick/www/Settings.java3
-rw-r--r--juick-www/src/main/static/scripts.js2
-rw-r--r--src/test/java/com/juick/tests/ApiTests.java2
10 files changed, 24 insertions, 23 deletions
diff --git a/juick-api/build.gradle b/juick-api/build.gradle
index 29726e5f..dbac7d59 100644
--- a/juick-api/build.gradle
+++ b/juick-api/build.gradle
@@ -20,11 +20,11 @@ repositories {
dependencies {
compile project(':juick-core')
compile project(':deps:com.juick.xmpp')
- compile "org.apache.commons:commons-lang3:3.4"
- compile "org.springframework:spring-jdbc:4.3.2.RELEASE"
+ compile "org.apache.commons:commons-lang3:3.5"
+ compile "org.springframework:spring-jdbc:4.3.3.RELEASE"
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
compile 'javax.inject:javax.inject:1'
- compile 'com.github.pengrad:java-telegram-bot-api:2.1.1'
+ compile 'com.github.pengrad:java-telegram-bot-api:2.1.4'
compile 'org.msbotframework4j:msbotframework4j-builder:0.1.4'
compile 'com.neovisionaries:nv-websocket-client:1.30'
compile 'org.apache.commons:commons-dbcp2:2.1.1'
diff --git a/juick-core/build.gradle b/juick-core/build.gradle
index 64950ea6..52c71739 100644
--- a/juick-core/build.gradle
+++ b/juick-core/build.gradle
@@ -7,14 +7,14 @@ repositories {
dependencies {
compile project(':deps:com.juick.xmpp')
- def jacksonVersion = '2.8.1'
+ def jacksonVersion = '2.8.4'
compile "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
compile "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
compile "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}"
compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${jacksonVersion}"
compile 'org.apache.httpcomponents:httpclient:4.5.2'
- compile 'org.apache.commons:commons-lang3:3.4'
- compile "org.springframework:spring-jdbc:4.3.2.RELEASE"
+ compile 'org.apache.commons:commons-lang3:3.5'
+ compile "org.springframework:spring-jdbc:4.3.3.RELEASE"
compile 'org.json:json:20160810'
}
diff --git a/juick-core/src/main/java/com/juick/Message.java b/juick-core/src/main/java/com/juick/Message.java
index cc2381d8..2c004f5a 100644
--- a/juick-core/src/main/java/com/juick/Message.java
+++ b/juick-core/src/main/java/com/juick/Message.java
@@ -42,10 +42,12 @@ public class Message implements Comparable {
public List<Tag> Tags = new ArrayList<>();
private Date date;
public int TimeAgo = 0;
+ @JsonIgnore
public int Privacy = 1;
public boolean FriendsOnly = false;
public boolean ReadOnly = false;
public boolean Hidden = false;
+ @JsonIgnore
public boolean VisitorCanComment = true;
public int Replies = 0;
public String RepliesBy = null;
diff --git a/juick-demo/build.gradle b/juick-demo/build.gradle
index 90206124..f37d942a 100644
--- a/juick-demo/build.gradle
+++ b/juick-demo/build.gradle
@@ -17,10 +17,10 @@ mainClassName = "com.juick.demo.Demo"
dependencies {
compile project(':juick-core')
- compile 'org.apache.commons:commons-lang3:3.4'
- compile 'org.springframework:spring-jdbc:4.3.2.RELEASE'
+ compile 'org.apache.commons:commons-lang3:3.5'
+ compile 'org.springframework:spring-jdbc:4.3.3.RELEASE'
compile 'mysql:mysql-connector-java:5.1.39'
- compile 'ch.vorburger.mariaDB4j:mariaDB4j:2.1.3'
+ compile 'ch.vorburger.mariaDB4j:mariaDB4j:2.2.2'
compile 'jline:jline:2.14.2'
}
compileJava.options.encoding = 'UTF-8' \ No newline at end of file
diff --git a/juick-rss/build.gradle b/juick-rss/build.gradle
index 2fe22275..7339a587 100644
--- a/juick-rss/build.gradle
+++ b/juick-rss/build.gradle
@@ -11,7 +11,7 @@ dependencies {
compile project(':juick-core')
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
compile 'org.apache.commons:commons-dbcp2:2.1.1'
- compile 'org.apache.commons:commons-lang3:3.4'
+ compile 'org.apache.commons:commons-lang3:3.5'
providedRuntime 'mysql:mysql-connector-java:5.1.39'
}
diff --git a/juick-ws/build.gradle b/juick-ws/build.gradle
index 8e86dd83..bb1f115c 100644
--- a/juick-ws/build.gradle
+++ b/juick-ws/build.gradle
@@ -19,20 +19,18 @@ dependencies {
compile project(':juick-core')
compile project(':deps:com.juick.xmpp')
compile 'org.slf4j:slf4j-jdk14:1.7.21'
- compile 'com.ganyo:gcm-server:1.0.+'
- compile 'com.notnoop.apns:apns:1.0.0.Beta6'
- def springFrameworkVersion = '4.3.2.RELEASE'
+ def springFrameworkVersion = '4.3.3.RELEASE'
compile "org.springframework:spring-jdbc:${springFrameworkVersion}"
compile "org.springframework:spring-webmvc:${springFrameworkVersion}"
compile "org.springframework:spring-websocket:${springFrameworkVersion}"
- def jacksonVersion = '2.8.1'
+ def jacksonVersion = '2.8.4'
compile "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
compile "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${jacksonVersion}"
compile 'javax.inject:javax.inject:1'
compile 'org.apache.httpcomponents:httpclient:4.5.2'
compile 'org.apache.commons:commons-dbcp2:2.1.1'
- compile 'com.mitchellbosecke:pebble-spring4:2.2.2'
+ compile 'com.mitchellbosecke:pebble-spring4:2.2.3'
providedRuntime 'mysql:mysql-connector-java:5.1.39'
}
diff --git a/juick-www/build.gradle b/juick-www/build.gradle
index 908b8d2f..78ef21e5 100644
--- a/juick-www/build.gradle
+++ b/juick-www/build.gradle
@@ -29,16 +29,16 @@ repositories {
dependencies {
compile project(':juick-core')
compile project(':deps:com.juick.xmpp')
- compile 'com.github.scribejava:scribejava-apis:3.1.0'
+ compile 'com.github.scribejava:scribejava-apis:3.2.0'
compile 'org.apache.httpcomponents:httpclient:4.5.2'
- compile 'org.apache.commons:commons-lang3:3.4'
+ compile 'org.apache.commons:commons-lang3:3.5'
compile 'commons-io:commons-io:2.5'
- compile "org.springframework:spring-jdbc:4.3.2.RELEASE"
+ compile "org.springframework:spring-jdbc:4.3.3.RELEASE"
compile 'org.apache.commons:commons-dbcp2:2.1.1'
compile 'net.coobird:thumbnailator:0.4.8'
compile 'com.github.ooxi:serialized-php-parser:0.5.0'
- compile 'net.jodah:failsafe:0.9.2'
- compile 'com.mitchellbosecke:pebble:2.2.2'
+ compile 'net.jodah:failsafe:0.9.5'
+ compile 'com.mitchellbosecke:pebble:2.2.3'
compile 'com.sun.mail:javax.mail:1.5.6'
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
providedRuntime 'mysql:mysql-connector-java:5.1.39'
diff --git a/juick-www/src/main/java/com/juick/www/Settings.java b/juick-www/src/main/java/com/juick/www/Settings.java
index 5a159362..67f001b6 100644
--- a/juick-www/src/main/java/com/juick/www/Settings.java
+++ b/juick-www/src/main/java/com/juick/www/Settings.java
@@ -46,6 +46,7 @@ import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.file.Files;
+import java.nio.file.StandardCopyOption;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
@@ -163,7 +164,7 @@ public class Settings {
Path ao = Paths.get(imgPath, "ao", originalName);
Path a = Paths.get(imgPath, "a", targetName);
Path as = Paths.get(imgPath, "as", targetName);
- Files.move(Paths.get(Utils.getTmpDir(), avatarTmpPath), ao);
+ Files.move(Paths.get(Utils.getTmpDir(), avatarTmpPath), ao, StandardCopyOption.REPLACE_EXISTING);
Thumbnails.of(ao.toFile()).size(96, 96).toFile(a.toFile());
Thumbnails.of(ao.toFile()).size(32, 32).toFile(as.toFile());
}
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js
index ebeba198..d368cacd 100644
--- a/juick-www/src/main/static/scripts.js
+++ b/juick-www/src/main/static/scripts.js
@@ -657,7 +657,7 @@ ready(function () {
});
document.querySelectorAll('.ir a').forEach(function(e) {
e.addEventListener('click', function (e) {
- var fname = e.target.parentNode.getAttribute('data-fname');
+ var fname = e.target.closest('[data-fname]').getAttribute('data-fname');
if (!showPhotoDialog(fname)) {
e.preventDefault();
}
diff --git a/src/test/java/com/juick/tests/ApiTests.java b/src/test/java/com/juick/tests/ApiTests.java
index 03b051f2..02180888 100644
--- a/src/test/java/com/juick/tests/ApiTests.java
+++ b/src/test/java/com/juick/tests/ApiTests.java
@@ -96,7 +96,7 @@ public class ApiTests {
assertNotEquals("db tags should be escaped", dbTagName, htmlTag.getName());
assertEquals("object tags should unescaped", htmlTag.getName(), StringEscapeUtils.unescapeHtml4(dbTagName));
assertEquals("template should encode escaped tag in url and show escaped tag in name",
- " *<a href=\"/tag/%3E_%3C\" rel=\"nofollow\">&gt;_&lt;</a>", PageTemplates.formatTags(new ArrayList<Tag>() {{ add(htmlTag); }} ));
+ "<a href=\"/tag/%3E_%3C\" rel=\"nofollow\">&gt;_&lt;</a>", PageTemplates.formatTags(new ArrayList<Tag>() {{ add(htmlTag); }} ));
}
@Test