diff options
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'] |