Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tongyifan committed May 20, 2019
1 parent 3a5bc52 commit 080c57b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ function check_comment_type($type)
stderr($lang_comment ['std_error'], $lang_comment ['std_invalid_id']);

$isOwner = false;
$res = sql_query("SELECT name, owner FROM torrents WHERE id = $parent_id") or sqlerr(__FILE__, __LINE__);
$arr = mysql_fetch_array($res);
if (get_user_class() < $commanage_class){
$res = sql_query("SELECT name, owner FROM torrents WHERE id = $parent_id") or sqlerr(__FILE__, __LINE__);
$arr = mysql_fetch_array($res);
if ($arr['owner'] != $CURUSER ["id"]){
stderr($lang_comment ['std_error'], $lang_comment ['std_permission_denied']);
}
Expand Down

0 comments on commit 080c57b

Please sign in to comment.