mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 01:48:41 +00:00
fix(blog-preview.php): click readmore will lead to 404 page
On Blog Preview page when someone set readmore flag will make rest of the content invisible. Instead there will be a button for users to click and get the full article. Because of the wrongly put link, it will make the last slash missing. Put the blog id back in the right place to get a right link.
This commit is contained in:
parent
46aa7b7005
commit
a604bf9476
@ -2,7 +2,7 @@
|
||||
if ($is_preview) {
|
||||
$readmore_pos = strpos($blog['content'], '<!-- readmore -->');
|
||||
if ($readmore_pos !== false) {
|
||||
$content = substr($blog['content'], 0, $readmore_pos).'<p><a href="'.HTML::blog_url(UOJContext::userid(), '/blog/').$blog['id'].'">阅读更多……</a></p>';
|
||||
$content = substr($blog['content'], 0, $readmore_pos).'<p><a href="'.HTML::blog_url(UOJContext::userid(), '/blog/'.$blog['id']).'">阅读更多……</a></p>';
|
||||
} else {
|
||||
$content = $blog['content'];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user