更新了body字段更新时的但双引号处理
This commit is contained in:
parent
08e0da7935
commit
7d71b3e351
|
@ -362,7 +362,7 @@ class Admin_NewsController extends Zend_Controller_Action
|
||||||
'source' => $this->replacehtml($source),
|
'source' => $this->replacehtml($source),
|
||||||
'typeid' => $typeid,
|
'typeid' => $typeid,
|
||||||
'pub' => $pub,
|
'pub' => $pub,
|
||||||
'body' => $body
|
'body' => $this->db->quote($body)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@ class Admin_NewsController extends Zend_Controller_Action
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
if($sth->execute())
|
if($sth->execute())
|
||||||
{
|
{
|
||||||
$sql = "UPDATE news_archivesaddon SET body='".$date['body']."' WHERE id='$id'";
|
$sql = "UPDATE news_archivesaddon SET body=".$date['body']." WHERE id='$id'";
|
||||||
if($this->db->exec($sql)>0)
|
if($this->db->exec($sql)>0)
|
||||||
{
|
{
|
||||||
echo '<div class="box box-success">发布成功!</div><script>
|
echo '<div class="box box-success">发布成功!</div><script>
|
||||||
|
|
Loading…
Reference in New Issue