diff --git a/app/models/postn/PostnDAO.php b/app/models/postn/PostnDAO.php index a993f6051..d719bfb62 100755 --- a/app/models/postn/PostnDAO.php +++ b/app/models/postn/PostnDAO.php @@ -383,6 +383,32 @@ class PostnDAO extends SQL { return $this->run('ContactPostn'); } + function getPublicItem($origin, $node, $nodeid, $limitf = false, $limitr = false) { + $this->_sql = ' + select *, postn.aid, privacy.value as privacy from postn + left outer join contact on postn.aid = contact.jid + left outer join privacy on postn.nodeid = privacy.pkey + where postn.origin = :origin + and postn.node = :node + and privacy.value = 1 + and postn.nodeid = :nodeid + order by postn.published desc'; + + if($limitr) + $this->_sql = $this->_sql.' limit '.$limitr.' offset '.$limitf; + + $this->prepare( + 'Postn', + array( + 'origin' => $origin, + 'node' => $node, + 'nodeid' => $nodeid, + ) + ); + + return $this->run('ContactPostn'); + } + // TODO: fixme function getComments($posts) { $commentsid = ''; diff --git a/app/widgets/About/About.php b/app/widgets/About/About.php index e4f15a2eb..fe1b1f09c 100755 --- a/app/widgets/About/About.php +++ b/app/widgets/About/About.php @@ -15,6 +15,12 @@ class About extends WidgetBase { - function load() { + function load() + { + } + + function display() + { + $this->view->assign('version', APP_VERSION); } } diff --git a/app/widgets/About/about.tpl b/app/widgets/About/about.tpl index 8e1038952..8c610effc 100755 --- a/app/widgets/About/about.tpl +++ b/app/widgets/About/about.tpl @@ -1,5 +1,5 @@
-

{$c->__('page.about')}

+

Movim {$version} - {$c->__('page.about')}