You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ad...@apache.org on 2021/01/04 13:09:16 UTC
[roller] branch master updated (07dcff1 -> 793310a)
This is an automated email from the ASF dual-hosted git repository.
adityasharma pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/roller.git.
from 07dcff1 Merge branch 'master' of https://github.com/apache/roller
new 00b5039 Fixed: sonarqube issue - strike was redundant
new 0001a2a Fixed: sonarqube issue - 'i' is already defined Variables and functions should not be redeclared Used let to provide let scope to it
new 71a951e Fixed: sonarqube issue - 'e' is already declared in the upper scope
new 82c5a5b Fixed: sonarqube issue - 'checked' is already defined Variables and functions should not be redeclared
new 793310a Fixed: sonarqube issue - 'toggle' is already declared in the upper scope Variables should not be shadowed
The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/roller/weblogger/util/HTMLSanitizer.java | 2 +-
app/src/main/webapp/roller-ui/scripts/ajax-user.js | 4 ++--
app/src/main/webapp/theme/scripts/clientSideInclude.js | 4 ++--
app/src/main/webapp/theme/scripts/roller.js | 13 +++++++------
4 files changed, 12 insertions(+), 11 deletions(-)
[roller] 04/05: Fixed: sonarqube issue - 'checked' is already
defined Variables and functions should not be redeclared
Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
adityasharma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/roller.git
commit 82c5a5b53650cb24b83417308374c8b3297121bc
Author: Aditya Sharma <ad...@apache.org>
AuthorDate: Mon Jan 4 18:27:51 2021 +0530
Fixed: sonarqube issue - 'checked' is already defined
Variables and functions should not be redeclared
---
app/src/main/webapp/theme/scripts/roller.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/src/main/webapp/theme/scripts/roller.js b/app/src/main/webapp/theme/scripts/roller.js
index 298a799..ef85d10 100644
--- a/app/src/main/webapp/theme/scripts/roller.js
+++ b/app/src/main/webapp/theme/scripts/roller.js
@@ -127,11 +127,12 @@ function folderPreference(folderId) {
}
function toggleNextRow(e) {
+ var checked;
if (e.type === "checkbox") {
- var checked = e.checked;
+ checked = e.checked;
} else if (e.type === "radio") {
var v = e.value;
- var checked = (v === "1" || v === "y" || v === "true");
+ checked = (v === "1" || v === "y" || v === "true");
}
// var nextRow = e.parentNode.parentNode.nextSibling;
// the above doesn't work on Mozilla since it treats white space as nodes
[roller] 03/05: Fixed: sonarqube issue - 'e' is already declared in
the upper scope
Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
adityasharma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/roller.git
commit 71a951edcb5218cf2f257d0e5898c865755606ef
Author: Aditya Sharma <ad...@apache.org>
AuthorDate: Mon Jan 4 17:40:17 2021 +0530
Fixed: sonarqube issue - 'e' is already declared in the upper scope
---
app/src/main/webapp/theme/scripts/clientSideInclude.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/webapp/theme/scripts/clientSideInclude.js b/app/src/main/webapp/theme/scripts/clientSideInclude.js
index 5a84141..02c4fe5 100644
--- a/app/src/main/webapp/theme/scripts/clientSideInclude.js
+++ b/app/src/main/webapp/theme/scripts/clientSideInclude.js
@@ -34,7 +34,7 @@ function clientSideInclude(id, url) {
} catch (e) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
- } catch (e) {
+ } catch (er) {
req = false;
}
}
@@ -68,4 +68,4 @@ function processReqChange() {
req.statusText);
}
}
-}
\ No newline at end of file
+}
[roller] 02/05: Fixed: sonarqube issue - 'i' is already defined
Variables and functions should not be redeclared Used let to provide let
scope to it
Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
adityasharma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/roller.git
commit 0001a2aada47b5c264ca1e2804820e9df472c0ec
Author: Aditya Sharma <ad...@apache.org>
AuthorDate: Mon Jan 4 17:33:02 2021 +0530
Fixed: sonarqube issue - 'i' is already defined
Variables and functions should not be redeclared
Used let to provide let scope to it
---
app/src/main/webapp/roller-ui/scripts/ajax-user.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/webapp/roller-ui/scripts/ajax-user.js b/app/src/main/webapp/roller-ui/scripts/ajax-user.js
index 49715b3..bc3ca60 100644
--- a/app/src/main/webapp/roller-ui/scripts/ajax-user.js
+++ b/app/src/main/webapp/roller-ui/scripts/ajax-user.js
@@ -75,13 +75,13 @@ function sendUserRequest(url) {
function handleUserResponse() {
if (http.readyState === 4) {
var userList = document.getElementById("userList");
- for (var i = userList.options.length; i >= 0; i--) {
+ for (let i = userList.options.length; i >= 0; i--) {
userList.options[i] = null;
}
var data = http.responseText;
if (data.indexOf("\n") !== -1) {
var lines = data.split('\n');
- for (var i = 0; i < lines.length; i++) {
+ for (let i = 0; i < lines.length; i++) {
if (lines[i].indexOf(',') !== -1) {
var userArray = lines[i].split(',');
userList.options[userList.length] =
[roller] 05/05: Fixed: sonarqube issue - 'toggle' is already
declared in the upper scope Variables should not be shadowed
Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
adityasharma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/roller.git
commit 793310ab4d7a96875522f913f172e98713b96c6d
Author: Aditya Sharma <ad...@apache.org>
AuthorDate: Mon Jan 4 18:38:29 2021 +0530
Fixed: sonarqube issue - 'toggle' is already declared in the upper scope
Variables should not be shadowed
Changed the name of variable instead of changing declaration in upper scope to avoid any code failure
---
app/src/main/webapp/theme/scripts/roller.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/src/main/webapp/theme/scripts/roller.js b/app/src/main/webapp/theme/scripts/roller.js
index ef85d10..1685b76 100644
--- a/app/src/main/webapp/theme/scripts/roller.js
+++ b/app/src/main/webapp/theme/scripts/roller.js
@@ -181,24 +181,24 @@ function isblank(s) {
window.defaultStatus=document.title;
// Toggle check boxes
-function toggleFunctionAll(toggle) {
+function toggleFunctionAll(toggleValue) {
var inputs = document.getElementsByTagName('input');
for(var i = 0; i < inputs.length ; i++) {
if(inputs[i].name !== "control" && inputs[i].type === 'checkbox' && inputs[i].disabled === false ) {
if (inputs[i].checked === true){
inputs[i].checked = !inputs[i].checked;
} else{
- inputs[i].checked = toggle;
+ inputs[i].checked = toggleValue;
}
}
}
}
-function toggleFunction(toggle,name) {;
+function toggleFunction(toggleValue,name) {
var inputs = document.getElementsByName(name);
for(var i = 0; i < inputs.length ; i++) {
if(inputs[i].type === 'checkbox' && inputs[i].disabled === false) {
- inputs[i].checked = toggle;
+ inputs[i].checked = toggleValue;
}
}
}
[roller] 01/05: Fixed: sonarqube issue - strike was redundant
Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
adityasharma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/roller.git
commit 00b5039fbbda3f1cdf84f6381965e1ac817875d6
Author: Aditya Sharma <ad...@apache.org>
AuthorDate: Mon Jan 4 13:54:20 2021 +0530
Fixed: sonarqube issue - strike was redundant
---
app/src/main/java/org/apache/roller/weblogger/util/HTMLSanitizer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/java/org/apache/roller/weblogger/util/HTMLSanitizer.java b/app/src/main/java/org/apache/roller/weblogger/util/HTMLSanitizer.java
index a83a30e..e1a8f58 100644
--- a/app/src/main/java/org/apache/roller/weblogger/util/HTMLSanitizer.java
+++ b/app/src/main/java/org/apache/roller/weblogger/util/HTMLSanitizer.java
@@ -54,7 +54,7 @@ public class HTMLSanitizer {
public static Pattern forbiddenTags = Pattern.compile("^(script|object|embed|link|style|form|input)$");
public static Pattern allowedTags = Pattern.compile("^(b|p|i|s|a|img|table|thead|tbody|tfoot|tr|th|td|dd|dl|dt|em|h1|h2|h3|h4|h5|h6|li|ul|ol|span|div|strike|strong|"
- + "sub|sup|pre|del|code|blockquote|strike|kbd|br|hr|area|map|object|embed|param|link|form|small|big)$");
+ + "sub|sup|pre|del|code|blockquote|kbd|br|hr|area|map|object|embed|param|link|form|small|big)$");
// <!--.........>
private static Pattern commentPattern = Pattern.compile("<!--.*");
// <tag ....props.....>