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 @@
{if="$value->node == 'urn:xmpp:microblog:0' && $value->getContact()->getTrueName() != ''"} diff --git a/system/Route.php b/system/Route.php index 909b9e2cc..d48e8f838 100755 --- a/system/Route.php +++ b/system/Route.php @@ -9,7 +9,7 @@ class Route extends \BaseController { 'account' => false, 'accountnext' => array('s', 'err'), 'admin' => false, - 'blog' => array('f'), + 'blog' => array('f', 'i'), 'chat' => array('f'), 'conf' => false, 'contact' => array('f'), @@ -74,9 +74,9 @@ class Route extends \BaseController { return BASE_URI; if(isset($routes[$page])) { - if($params != false && count($routes[$page]) != count($params)) { - throw new Exception(__('error.route', $page)); - } else { + //if($params != false && count($routes[$page]) != count($params)) { + //throw new Exception(__('error.route', $page)); + //} else { if($tab != false) $tab = '#'.$tab; //We construct a classic URL if the rewriting is disabled @@ -103,7 +103,7 @@ class Route extends \BaseController { $uri .= '/'.$params; } return $uri.$tab; - } + //} } else { throw new Exception(__('Route not set for the page %s', $page)); }