修正错误
This commit is contained in:
parent
78e60b7317
commit
929a9798b5
|
@ -46,10 +46,11 @@ class Admin_WatermdController extends Zend_Controller_Action
|
||||||
//防止正则错误
|
//防止正则错误
|
||||||
if (!empty($new_data))
|
if (!empty($new_data))
|
||||||
{
|
{
|
||||||
$sql="update metadata set data=? where uuid=?";
|
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
|
||||||
$this->wdb->query($sql,array($new_data,$uuid));
|
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||||
|
{
|
||||||
$dom = new DOMDocument();
|
$dom = new DOMDocument();
|
||||||
$dom->loadXML($formdata['source']);
|
$dom->loadXML($row['data']);
|
||||||
$title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue;
|
$title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue;
|
||||||
$deal['uuid']=$uuid;
|
$deal['uuid']=$uuid;
|
||||||
$deal['title']=$title;
|
$deal['title']=$title;
|
||||||
|
@ -58,6 +59,7 @@ class Admin_WatermdController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$this->view->form=$form;
|
$this->view->form=$form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,6 +86,7 @@ class Admin_WatermdController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$sql="select uuid,data from metadata where istemplate = 'n'";
|
$sql="select uuid,data from metadata where istemplate = 'n'";
|
||||||
$rows=$this->wdb->fetchAll($sql);
|
$rows=$this->wdb->fetchAll($sql);
|
||||||
|
$this->view->deal=array();
|
||||||
foreach($rows as $k=>$row)
|
foreach($rows as $k=>$row)
|
||||||
{
|
{
|
||||||
//do the replace
|
//do the replace
|
||||||
|
@ -91,10 +94,11 @@ class Admin_WatermdController extends Zend_Controller_Action
|
||||||
//防止正则错误
|
//防止正则错误
|
||||||
if (!empty($new_data))
|
if (!empty($new_data))
|
||||||
{
|
{
|
||||||
$sql="update metadata set data=? where uuid=?";
|
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
|
||||||
$this->wdb->query($sql,array($new_data,$uuid));
|
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||||
|
{
|
||||||
$dom = new DOMDocument();
|
$dom = new DOMDocument();
|
||||||
$dom->loadXML($formdata['source']);
|
$dom->loadXML($row['data']);
|
||||||
$title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue;
|
$title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue;
|
||||||
$deal['uuid']=$uuid;
|
$deal['uuid']=$uuid;
|
||||||
$deal['title']=$title;
|
$deal['title']=$title;
|
||||||
|
@ -103,6 +107,7 @@ class Admin_WatermdController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$this->view->form=$form;
|
$this->view->form=$form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,6 +147,7 @@ class Admin_WatermdController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$sql="select uuid,data from metadata where istemplate = 'n'";
|
$sql="select uuid,data from metadata where istemplate = 'n'";
|
||||||
$rows=$this->wdb->fetchAll($sql);
|
$rows=$this->wdb->fetchAll($sql);
|
||||||
|
$this->view->deal=array();
|
||||||
foreach($rows as $k=>$row)
|
foreach($rows as $k=>$row)
|
||||||
{
|
{
|
||||||
//do the replace
|
//do the replace
|
||||||
|
@ -170,8 +176,11 @@ class Admin_WatermdController extends Zend_Controller_Action
|
||||||
//防止错误
|
//防止错误
|
||||||
if (!empty($new_data))
|
if (!empty($new_data))
|
||||||
{
|
{
|
||||||
$sql="update metadata set data=? where uuid=?";
|
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
|
||||||
$this->wdb->query($sql,array($new_data,$uuid));
|
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||||
|
{
|
||||||
|
$dom = new DOMDocument();
|
||||||
|
$dom->loadXML($row['data']);
|
||||||
$deal['uuid']=$uuid;
|
$deal['uuid']=$uuid;
|
||||||
$deal['title']=$title;
|
$deal['title']=$title;
|
||||||
$this->view->deal[]=$deal;
|
$this->view->deal[]=$deal;
|
||||||
|
@ -179,6 +188,7 @@ class Admin_WatermdController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$this->view->form=$form;
|
$this->view->form=$form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,6 +301,7 @@ class Admin_WatermdController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$sql="select uuid,data from metadata where istemplate = 'n'";
|
$sql="select uuid,data from metadata where istemplate = 'n'";
|
||||||
$rows=$this->wdb->fetchAll($sql);
|
$rows=$this->wdb->fetchAll($sql);
|
||||||
|
$this->view->deal=array();
|
||||||
foreach($rows as $k=>$row)
|
foreach($rows as $k=>$row)
|
||||||
{
|
{
|
||||||
//do the replace
|
//do the replace
|
||||||
|
@ -326,8 +337,9 @@ class Admin_WatermdController extends Zend_Controller_Action
|
||||||
//防止错误
|
//防止错误
|
||||||
if (!empty($new_data))
|
if (!empty($new_data))
|
||||||
{
|
{
|
||||||
$sql="update metadata set data=? where uuid=?";
|
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
|
||||||
$this->wdb->query($sql,array($new_data,$uuid));
|
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||||
|
{
|
||||||
$deal['uuid']=$uuid;
|
$deal['uuid']=$uuid;
|
||||||
$deal['title']=$title;
|
$deal['title']=$title;
|
||||||
$this->view->deal[]=$deal;
|
$this->view->deal[]=$deal;
|
||||||
|
@ -336,6 +348,7 @@ class Admin_WatermdController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$this->view->form=$form;
|
$this->view->form=$form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue