From fb641940104dcccf6210eed1a7940af960600f57 Mon Sep 17 00:00:00 2001
From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com>
Date: Sun, 10 May 2020 15:17:52 +0800
Subject: [PATCH 1/3] fix: guest upload error when hide login btn
---
common.php | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/common.php b/common.php
index 5453e4e..33fe6e4 100644
--- a/common.php
+++ b/common.php
@@ -1797,6 +1797,13 @@ function render_list($path = '', $files = '')
$tmp = splitfirst($tmp[1], '');
$html .= $tmp[1];
}
+ $tmp[1] = 'a';
+ while ($tmp[1]!='') {
+ $tmp = splitfirst($html, '');
+ $html = $tmp[0];
+ $tmp = splitfirst($tmp[1], '');
+ $html .= $tmp[1];
+ }
while (strpos($html, '')) {
$html = str_replace('', '', $html);
$html = str_replace('', '', $html);
@@ -1837,6 +1844,8 @@ function render_list($path = '', $files = '')
$html .= $tmp[1];
}
}
+ while (strpos($html, '')) $html = str_replace('', '', $html);
+ while (strpos($html, '')) $html = str_replace('', '', $html);
}
if ($_SERVER['is_guestup_path']&&!$_SERVER['admin']) {
From cb0cf8f8e45300c5fbf519c53551b13ee813eb75 Mon Sep 17 00:00:00 2001
From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com>
Date: Sun, 10 May 2020 15:18:37 +0800
Subject: [PATCH 2/3] fix: guest upload error when hide login btn
---
theme/classic.html | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/theme/classic.html b/theme/classic.html
index f1a9240..a3a21f7 100644
--- a/theme/classic.html
+++ b/theme/classic.html
@@ -903,19 +903,19 @@
reader.readAsArrayBuffer(blob);
}
readblob(asize);
-
+
var spark = new SparkMD5.ArrayBuffer();
-
+
reader.onload = function(e){
var binary = this.result;
-
+
spark.append(binary);
if (asize < newstartsize) {
asize += chunksize;
readblob(asize);
return;
}
-
+
var xhr = new XMLHttpRequest();
xhr.open("PUT", url, true);
//xhr.setRequestHeader('x-requested-with','XMLHttpRequest');
@@ -942,7 +942,7 @@
xhr3.onload = function(e){
console.log(xhr3.responseText+','+xhr3.status);
}
-
+
var filemd5 = spark.end();
var xhr4 = new XMLHttpRequest();
xhr4.open("GET", '?action=uploaded_rename&filename='+encodeURIComponent((file.webkitRelativePath||file.name))+'&filemd5='+filemd5);
@@ -967,7 +967,7 @@
document.getElementById('upfile_a1_'+tdnum).href = filename;
document.getElementById('upfile_cpbt_'+tdnum).style.display = "";
}
-
+
EndTime=new Date();
MiddleStr = ':'+EndTime.toLocaleString()+'
';
if (newstartsize==0) {
From f5eaea3917591161a014aaaeb9504eca95f20d96 Mon Sep 17 00:00:00 2001
From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com>
Date: Sun, 10 May 2020 15:20:05 +0800
Subject: [PATCH 3/3] fix: guest upload error when hide login btn
---
theme/onemoe.html | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/theme/onemoe.html b/theme/onemoe.html
index 59733e9..161d0e9 100644
--- a/theme/onemoe.html
+++ b/theme/onemoe.html
@@ -877,19 +877,19 @@
reader.readAsArrayBuffer(blob);
}
readblob(asize);
-
+
var spark = new SparkMD5.ArrayBuffer();
-
+
reader.onload = function(e){
var binary = this.result;
-
+
spark.append(binary);
if (asize < newstartsize) {
asize += chunksize;
readblob(asize);
return;
}
-
+
var xhr = new XMLHttpRequest();
xhr.open("PUT", url, true);
//xhr.setRequestHeader('x-requested-with','XMLHttpRequest');
@@ -916,7 +916,7 @@
xhr3.onload = function(e){
console.log(xhr3.responseText+','+xhr3.status);
}
-
+
var filemd5 = spark.end();
var xhr4 = new XMLHttpRequest();
xhr4.open("GET", '?action=uploaded_rename&filename='+encodeURIComponent((file.webkitRelativePath||file.name))+'&filemd5='+filemd5);
@@ -941,7 +941,7 @@
document.getElementById('upfile_a1_'+tdnum).href = filename;
document.getElementById('upfile_cpbt_'+tdnum).style.display = "";
}
-
+
EndTime=new Date();
MiddleStr = ':'+EndTime.toLocaleString()+'
';
if (newstartsize==0) {