Skip to content

Commit ad4b076

Browse files
committed
09-Auth all.php : minor update
1 parent 045400a commit ad4b076

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

09-Auth/all.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,8 @@ protected function read() : string
341341

342342
protected function update() : string
343343
{
344+
if ($_POST) return parent::update();
345+
344346
$sql = "
345347
SELECT n.*, u.id as uid, u.login, u.fname, u.lname
346348
FROM news n
@@ -357,7 +359,7 @@ protected function delete() : string
357359
$author = db::read('author', 'id', $this->g->in['i'], '', 'col');
358360
if ($_SESSION['usr']['id'] !== $author) {
359361
util::log('You do not have permissions to delete this post');
360-
return $this->list();
362+
return $this->read();
361363
}
362364
}
363365

0 commit comments

Comments
 (0)