diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-10-09 21:03:50 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-10-09 21:03:50 +0000 |
commit | 9e0955c96d888fc2e00014498d095a7d65ab48fb (patch) | |
tree | 72a08e21be4d61b7ea2ec56891652355c22c5e2c /h-source/Application/Controllers/BaseController.php | |
parent | f8f3c572e55c90ae13253eb8c910a030bf175e09 (diff) |
improved the way modules are taken from an xml configuration string
Diffstat (limited to 'h-source/Application/Controllers/BaseController.php')
-rw-r--r-- | h-source/Application/Controllers/BaseController.php | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/h-source/Application/Controllers/BaseController.php b/h-source/Application/Controllers/BaseController.php index 13bbb66..2d8c0a7 100644 --- a/h-source/Application/Controllers/BaseController.php +++ b/h-source/Application/Controllers/BaseController.php @@ -168,6 +168,20 @@ class BaseController extends Controller return null; } +// get the HTML of a module from the xml configuration string +// $xmlPath: array conitaining the path + protected function getModule($xmlPath) + { + $tracksHelpLabel = null; + $xml = $this->getBox($xmlPath); + if ($xml) + { + $box_news = new BoxParser($xml); + $tracksHelpLabel = $box_news->render(); + } + return $tracksHelpLabel; + } + protected function right($lang = 'en') { $hard = new HardwareModel(); @@ -179,14 +193,8 @@ class BaseController extends Controller $data['numbLogged'] = count($logged); //render the boxes inside the right column - $data['htmlRightBox'] = null; - $xml = $this->getBox(array('right_column')); - if ($xml) - { - $box_news = new BoxParser($xml); - $data['htmlRightBox'] = $box_news->render(); - } - + $data['htmlRightBox'] = $this->getModule(array('right_column')); + $data['language_links'] = $this->buildLanguageLinks($this->lang); $data['lastModif'] = $this->m['HistoryModel'] |