merge trunk r1425
This commit is contained in:
parent
5b312de191
commit
6ddc5f9cf3
|
@ -46,14 +46,16 @@ class Admin_WatermdController extends Zend_Controller_Action
|
|||
//防止正则错误
|
||||
if (!empty($new_data))
|
||||
{
|
||||
$sql="update metadata set data=? where uuid=?";
|
||||
$this->wdb->query($sql,array($new_data,$uuid));
|
||||
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
|
||||
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($formdata['source']);
|
||||
$dom->loadXML($row['data']);
|
||||
$title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue;
|
||||
$deal['uuid']=$uuid;
|
||||
$deal['title']=$title;
|
||||
$this->view->deal[]=$deal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,6 +86,7 @@ class Admin_WatermdController extends Zend_Controller_Action
|
|||
{
|
||||
$sql="select uuid,data from metadata where istemplate = 'n'";
|
||||
$rows=$this->wdb->fetchAll($sql);
|
||||
$this->view->deal=array();
|
||||
foreach($rows as $k=>$row)
|
||||
{
|
||||
//do the replace
|
||||
|
@ -91,14 +94,16 @@ class Admin_WatermdController extends Zend_Controller_Action
|
|||
//防止正则错误
|
||||
if (!empty($new_data))
|
||||
{
|
||||
$sql="update metadata set data=? where uuid=?";
|
||||
$this->wdb->query($sql,array($new_data,$uuid));
|
||||
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
|
||||
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($formdata['source']);
|
||||
$dom->loadXML($row['data']);
|
||||
$title=$dom->getElementsByTagName('resTitle')->item(0)->nodeValue;
|
||||
$deal['uuid']=$uuid;
|
||||
$deal['title']=$title;
|
||||
$this->view->deal[]=$deal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -142,6 +147,7 @@ class Admin_WatermdController extends Zend_Controller_Action
|
|||
{
|
||||
$sql="select uuid,data from metadata where istemplate = 'n'";
|
||||
$rows=$this->wdb->fetchAll($sql);
|
||||
$this->view->deal=array();
|
||||
foreach($rows as $k=>$row)
|
||||
{
|
||||
//do the replace
|
||||
|
@ -170,11 +176,15 @@ class Admin_WatermdController extends Zend_Controller_Action
|
|||
//防止错误
|
||||
if (!empty($new_data))
|
||||
{
|
||||
$sql="update metadata set data=? where uuid=?";
|
||||
$this->wdb->query($sql,array($new_data,$uuid));
|
||||
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
|
||||
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($row['data']);
|
||||
$deal['uuid']=$uuid;
|
||||
$deal['title']=$title;
|
||||
$this->view->deal[]=$deal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -291,6 +301,7 @@ class Admin_WatermdController extends Zend_Controller_Action
|
|||
{
|
||||
$sql="select uuid,data from metadata where istemplate = 'n'";
|
||||
$rows=$this->wdb->fetchAll($sql);
|
||||
$this->view->deal=array();
|
||||
foreach($rows as $k=>$row)
|
||||
{
|
||||
//do the replace
|
||||
|
@ -326,11 +337,13 @@ class Admin_WatermdController extends Zend_Controller_Action
|
|||
//防止错误
|
||||
if (!empty($new_data))
|
||||
{
|
||||
$sql="update metadata set data=? where uuid=?";
|
||||
$this->wdb->query($sql,array($new_data,$uuid));
|
||||
$sql="update metadata set data=? where uuid='".$row['uuid']."'";
|
||||
if ($this->wdb->exec($this->wdb->quoteInto($sql,$new_data)))
|
||||
{
|
||||
$deal['uuid']=$uuid;
|
||||
$deal['title']=$title;
|
||||
$this->view->deal[]=$deal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue