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/GenericController.php | |
parent | f8f3c572e55c90ae13253eb8c910a030bf175e09 (diff) |
improved the way modules are taken from an xml configuration string
Diffstat (limited to 'h-source/Application/Controllers/GenericController.php')
-rw-r--r-- | h-source/Application/Controllers/GenericController.php | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php index f1f1d70..d466d61 100644 --- a/h-source/Application/Controllers/GenericController.php +++ b/h-source/Application/Controllers/GenericController.php @@ -130,7 +130,7 @@ class GenericController extends BaseController $data['submitName'] = "insertAction"; $data['hiddenInput'] = null; - $data['tracksHelpLabel'] = $this->getEntryLabel('it_tracks_users'); + $data['tracksHelpLabel'] = $this->getModule(array('devices',$this->controller,'form','it_tracks_users')); $data['values'] = $this->m['HardwareModel']->getFormValues('insert','sanitizeHtml'); $this->append($data); @@ -291,7 +291,7 @@ class GenericController extends BaseController $data['values'] = $this->m['HardwareModel']->getFormValues('update','sanitizeHtml'); $data['hiddenInput'] = "<input type='hidden' name='id_hard' value='".$clean['id_hard']."'>\n"; - $data['tracksHelpLabel'] = $this->getEntryLabel('it_tracks_users'); + $data['tracksHelpLabel'] = $this->getModule(array('devices',$this->controller,'form','it_tracks_users')); $this->append($data); @@ -326,19 +326,6 @@ class GenericController extends BaseController } } -// get the help label for the "it_tracks_users" entry - protected function getEntryLabel($entryName) - { - $tracksHelpLabel = null; - $xml = $this->getBox(array('devices',$this->controller,'form',$entryName)); - if ($xml) - { - $box_news = new BoxParser($xml); - $tracksHelpLabel = $box_news->render(); - } - return $tracksHelpLabel; - } - //get the preview of the description entry protected function getPreview() { @@ -549,7 +536,8 @@ class GenericController extends BaseController $data['isDeleted'] = $this->m['HardwareModel']->isDeleted($clean['id_hard']); $data['isApproved'] = strcmp($data['table'][0]['hardware']['approved'],'yes') === 0 ? true : false; - $data['tracksHelpLabel'] = $this->getEntryLabel('it_tracks_users'); + $data['tracksHelpTop'] = $this->getModule(array('devices',$this->controller,'page','it_tracks_users')); + $data['tracksHelpLabel'] = $this->getModule(array('devices',$this->controller,'form','it_tracks_users')); $this->passWhoAskedForDeletion($clean['id_hard']); } |