Commit 92233151 authored by winddramon's avatar winddramon

fix bug fix

parent 3e70fda0
...@@ -21,7 +21,7 @@ function init_messages($mode){ ...@@ -21,7 +21,7 @@ function init_messages($mode){
//如果没有新站内信则返回0,否则返回新站内信的数目 //如果没有新站内信则返回0,否则返回新站内信的数目
function message_check_new($username) function message_check_new($username)
{ {
global $cuser,$db,$gtablepre; global $cuser,$db,$gtablepre,$messages_autocreatedb;
$num = 0; $num = 0;
if($cuser){ if($cuser){
//考虑到devtools.php也得先载入common.inc.php,从而如果没有建表就会直接出错,必须在这里就做判断是否存在message表 //考虑到devtools.php也得先载入common.inc.php,从而如果没有建表就会直接出错,必须在这里就做判断是否存在message表
...@@ -34,7 +34,7 @@ function message_check_new($username) ...@@ -34,7 +34,7 @@ function message_check_new($username)
create_messages_db(); create_messages_db();
} }
} }
$result = $db->query("SELECT mid FROM {$gtablepre}messages WHERE receiver='$username' AND rd=0"); $result = $db->query("SELECT mid FROM {$gtablepre}messages WHERE receiver='$cuser' AND rd=0");
$num = $db->num_rows($result); $num = $db->num_rows($result);
} }
return $num; 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