make PM reading work

This commit is contained in:
Shish 2012-03-09 21:54:09 +00:00
parent 15acbc08bd
commit 9608feffa6

View file

@ -112,7 +112,7 @@ class PrivMsg extends Extension {
}
else if(($pm["to_id"] == $user->id) || $user->is_admin()) {
$from_user = User::by_id(int_escape($pm["from_id"]));
$database->get_row("UPDATE private_message SET is_read='Y' WHERE id = :id", array("id" => $pm_id));
$database->execute("UPDATE private_message SET is_read='Y' WHERE id = :id", array("id" => $pm_id));
$database->cache->delete("pm-count-{$user->id}");
$this->theme->display_message($page, $from_user, $user, new PM($pm));
}