Commit a62dee8b authored by Nemo Ma's avatar Nemo Ma Committed by GitHub

Merge pull request #205 from winddramon/nachster

bug fix for insite messages
parents a6e323c7 f1879583
......@@ -21,7 +21,8 @@ function init_messages($mode){
//如果没有新站内信则返回0,否则返回新站内信的数目
function message_check_new($username)
{
global $cuser,$db,$gtablepre;
global $cuser,$db,$gtablepre,$messages_autocreatedb;
$num = 0;
if($cuser){
//考虑到devtools.php也得先载入common.inc.php,从而如果没有建表就会直接出错,必须在这里就做判断是否存在message表
//而既然做了判断为什么不直接建表呢?
......@@ -33,9 +34,9 @@ function message_check_new($username)
create_messages_db();
}
}
$result = $db->query("SELECT mid FROM {$gtablepre}messages WHERE receiver='$cuser' AND rd=0");
$num = $db->num_rows($result);
}
$result = $db->query("SELECT mid FROM {$gtablepre}messages WHERE receiver='$username' AND rd=0");
$num = $db->num_rows($result);
return $num;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment