#243 数据评论的回复中记录回复者的email和ip地址
This commit is contained in:
parent
159af19e17
commit
a1e3c21c4d
|
@ -605,11 +605,14 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$user = $auth->getIdentity();
|
$user = $auth->getIdentity();
|
||||||
$uid = $user->id;
|
$uid = $user->id;
|
||||||
|
$email = $user->email;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "INSERT INTO comments (uuid,author,reply,userid,content) VALUES (?,?,?,?,?)";
|
$ipaddr = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
|
$sql = "INSERT INTO comments (uuid,author,reply,userid,content,email,ip) VALUES (?,?,?,?,?,?,?)";
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
$rs = $sth->execute(array($uuid,$user->username,$reply,$uid,$body));
|
$rs = $sth->execute(array($uuid,$user->username,$reply,$uid,$body,$email,$ipaddr));
|
||||||
|
|
||||||
if($rs)
|
if($rs)
|
||||||
{
|
{
|
||||||
|
@ -2932,7 +2935,6 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 保存XML数据到数据库
|
* 保存XML数据到数据库
|
||||||
*/
|
*/
|
||||||
|
@ -2954,4 +2956,3 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
return true;
|
return true;
|
||||||
}//jsonexit() 退出并返回json数据
|
}//jsonexit() 退出并返回json数据
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1148,6 +1148,7 @@ class AuthorController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$user = $auth->getIdentity();
|
$user = $auth->getIdentity();
|
||||||
$uid = $user->id;
|
$uid = $user->id;
|
||||||
|
$email = $user->email;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT md.title,c.id,c.author,c.email,c.url,c.ts_created,c.content FROM comments c
|
$sql = "SELECT md.title,c.id,c.author,c.email,c.url,c.ts_created,c.content FROM comments c
|
||||||
|
@ -1166,9 +1167,11 @@ class AuthorController extends Zend_Controller_Action
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "INSERT INTO comments (uuid,author,reply,userid,content) VALUES (?,?,?,?,?)";
|
$ipaddr = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
|
$sql = "INSERT INTO comments (uuid,author,reply,userid,content,email,ip) VALUES (?,?,?,?,?,?,?)";
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
$rs = $sth->execute(array($uuid,$user->username,$reply,$uid,$body));
|
$rs = $sth->execute(array($uuid,$user->username,$reply,$uid,$body,$email,$ipaddr));
|
||||||
|
|
||||||
if($rs)
|
if($rs)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue