aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/HomeController.php
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Controllers/HomeController.php')
-rw-r--r--h-source/Application/Controllers/HomeController.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/h-source/Application/Controllers/HomeController.php b/h-source/Application/Controllers/HomeController.php
index 5eff4d9..96479f3 100644
--- a/h-source/Application/Controllers/HomeController.php
+++ b/h-source/Application/Controllers/HomeController.php
@@ -37,20 +37,13 @@ class HomeController extends BaseController
public function index($lang = 'en')
{
// get the news container
- $this->m['BoxesModel']->setWhereQueryClause(array('title'=>'home_news'));
- $boxes = $this->m['BoxesModel']->getAll('boxes');
-
- if (count($boxes) > 0)
+ $data['htmlNewsBox'] = null;
+ $xml = $this->getBox(array('top_news'));
+ if ($xml)
{
- $xml = htmlspecialchars_decode($boxes[0]['boxes']['message'],ENT_QUOTES);
-
$box_news = new BoxParser($xml);
$data['htmlNewsBox'] = $box_news->render();
}
- else
- {
- $data['htmlNewsBox'] = null;
- }
$this->append($data);
$this->cleverLoad('left');