fix: guest upload error when hide login btn

This commit is contained in:
qkqpttgf 2020-05-10 15:17:52 +08:00 committed by GitHub
parent fdf37489e4
commit fb64194010
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -1797,6 +1797,13 @@ function render_list($path = '', $files = '')
$tmp = splitfirst($tmp[1], '<!--LoginEnd-->');
$html .= $tmp[1];
}
$tmp[1] = 'a';
while ($tmp[1]!='') {
$tmp = splitfirst($html, '<!--GuestStart-->');
$html = $tmp[0];
$tmp = splitfirst($tmp[1], '<!--GuestEnd-->');
$html .= $tmp[1];
}
while (strpos($html, '<!--AdminStart-->')) {
$html = str_replace('<!--AdminStart-->', '', $html);
$html = str_replace('<!--AdminEnd-->', '', $html);
@ -1837,6 +1844,8 @@ function render_list($path = '', $files = '')
$html .= $tmp[1];
}
}
while (strpos($html, '<!--GuestStart-->')) $html = str_replace('<!--GuestStart-->', '', $html);
while (strpos($html, '<!--GuestEnd-->')) $html = str_replace('<!--GuestEnd-->', '', $html);
}
if ($_SERVER['is_guestup_path']&&!$_SERVER['admin']) {