Browse Source

- Fix the counter on MySQL databases

- Remove useless Ajax calls
pull/16/head
Jaussoin Timothée 12 years ago
parent
commit
7cfbcb208f
  1. 8
      app/models/postn/PostnDAO.php
  2. 2
      app/widgets/News/News.php
  3. 2
      app/widgets/Wall/Wall.php

8
app/models/postn/PostnDAO.php

@ -378,8 +378,10 @@ class PostnDAO extends SQL {
);
$arr = $this->run(null, 'array');
if(is_array($arr))
return $arr[0]['count'];
if(is_array($arr) && isset($arr[0])) {
$arr = array_values($arr[0]);
return (int)$arr[0];
}
}
function getLastDate() {
@ -404,7 +406,7 @@ class PostnDAO extends SQL {
);
$arr = $this->run(null, 'array');
if(is_array($arr))
if(is_array($arr) && isset($arr[0]))
return $arr[0]['published'];
}
}

2
app/widgets/News/News.php

@ -13,8 +13,6 @@ class News extends WidgetCommon {
function display()
{
$this->view->assign('news', $this->prepareNews(-1));
//Cache::c('since', date(DATE_ISO8601));
}
/**

2
app/widgets/Wall/Wall.php

@ -26,7 +26,7 @@ class Wall extends WidgetCommon
function load()
{
$this->addjs('wall.js');
$this->registerEvent('post', 'onStream');
$this->registerEvent('postmicroblog', 'onStream');
$this->registerEvent('stream', 'onStream');
$this->registerEvent('comment', 'onComment');
$this->registerEvent('nocomment', 'onNoComment');

Loading…
Cancel
Save