use content cache in TXT

pull/282/head
qkqpttgf 2021-03-31 15:28:00 +08:00 committed by GitHub
parent 449ead425a
commit 671481c284
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -2111,11 +2111,10 @@ function render_list($path = '', $files = [])
$html = str_replace('<!--constStr@ClicktoEdit-->', getconstStr('ClicktoEdit'), $html);
$html = str_replace('<!--constStr@CancelEdit-->', getconstStr('CancelEdit'), $html);
$html = str_replace('<!--constStr@Save-->', getconstStr('Save'), $html);
while (strpos($html, '<!--TxtContent-->')) $html = str_replace('<!--TxtContent-->', htmlspecialchars(curl('GET', $files['url'], '', [], 0, 1)['body']), $html);
//while (strpos($html, '<!--TxtContent-->')) $html = str_replace('<!--TxtContent-->', htmlspecialchars(get_content(spurlencode(path_format(urldecode($path) . '/' . $files['name']), '/'))['content']['body']), $html);
//while (strpos($html, '<!--TxtContent-->')) $html = str_replace('<!--TxtContent-->', htmlspecialchars(curl('GET', $files['url'], '', [], 0, 1)['body']), $html);
while (strpos($html, '<!--TxtContent-->')) $html = str_replace('<!--TxtContent-->', htmlspecialchars(get_content(spurlencode(path_format(urldecode($path)), '/'))['content']['body']), $html);
$html = str_replace('<!--constStr@FileNotSupport-->', getconstStr('FileNotSupport'), $html);
//$html = str_replace('<!--constStr@File-->', getconstStr('File'), $html);
} elseif ($files['type']=='folder') {
while (strpos($html, '<!--GuestUploadStart-->')) {