admin can edit post now
This commit is contained in:
parent
fda4ffbbce
commit
47b238a233
8
post.php
8
post.php
@ -277,15 +277,15 @@ if (isset($_GET['pid'])) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($post->author != $user->username) {
|
if ($post->author != $user->username && $user->level < 8) {
|
||||||
http_response_code(403);
|
http_response_code(403);
|
||||||
header('Location: post.php?err=edit');
|
header('Location: post.php?err=edit');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$title = $post->title;
|
$title = $post->title;
|
||||||
$content = $post->content;
|
$content = $post->content;
|
||||||
|
}
|
||||||
|
|
||||||
$view = new View('theme/default.html', 'theme/nav/util.php', 'theme/sidebar.php', $blog['name'], ($title == "" ? "文章" : $title));
|
$view = new View('theme/default.html', 'theme/nav/util.php', 'theme/sidebar.php', $blog['name'], ($title == "" ? "文章" : $title));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user