添加元数据标题显示

This commit is contained in:
wlx 2012-03-23 14:41:51 +00:00
parent 298f038b47
commit 234a61963e
2 changed files with 7 additions and 4 deletions

View File

@ -1086,14 +1086,16 @@ class AuthorController extends Zend_Controller_Action
$uuid = $this->_request->getParam('uuid');
if(preg_match("/^[0-9A-Za-z]{8}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{12}$/",$uuid))
{
$sql = "SELECT c.author,c.email,c.url,c.ts_created,c.content FROM comments c
LEFT JOIN mdauthor a ON a.uuid=c.uuid
$sql = "SELECT c.author,c.email,c.url,c.ts_created,c.content,m.title FROM comments c
LEFT JOIN mdauthor a ON a.uuid=c.uuid
left join metadata m on m.uuid=c.uuid
WHERE c.uuid=? AND a.userid=?
ORDER BY ts_created DESC";
$sth = $this->db->prepare($sql);
$sth->execute(array($uuid,$u_id));
$rows = $sth->fetchAll();
$rows = $sth->fetchAll();
@$this->view->mdtitle=$rows[0]['title'];
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));

View File

@ -27,7 +27,8 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<div id="datalist">
<?php
if (count($this->paginator)):
if (count($this->paginator)):
echo "<h2>数据标题:".$this->mdtitle."</h2>";
echo "<ul>";
$autoindex=0;
foreach ($this->paginator as $item):