X-Git-Url: https://git.llucax.com/software/bife/bife-all.git/blobdiff_plain/83c0aaf19ae9241ba9f30da47013479ee761685e..f36ac20c1ad9e4d0987240a7fd2e0438f492be9b:/src/BIFE/Generic.php?ds=inline diff --git a/src/BIFE/Generic.php b/src/BIFE/Generic.php index 1cca645..c98bc49 100644 --- a/src/BIFE/Generic.php +++ b/src/BIFE/Generic.php @@ -26,7 +26,6 @@ // $Id$ // - // +X2C includes require_once 'BIFE/Container.php'; // ~X2C @@ -43,7 +42,7 @@ class BIFE_Generic extends BIFE_Container { * Attribute list. * * @var array $attrs - * @access public + * @access protected */ var $attrs; @@ -82,7 +81,7 @@ class BIFE_Generic extends BIFE_Container { // +X2C Operation 11 /** - * Add contents to the widget. + * Add contents to the container. * * @param mixed &$contents Contents to add. * @@ -94,7 +93,9 @@ class BIFE_Generic extends BIFE_Container { if (is_string($contents)) { $contents = trim($contents); } - parent::addContents($contents); + if ($contents) { + parent::addContents($contents); + } } // -X2C @@ -109,13 +110,14 @@ class BIFE_Generic extends BIFE_Container { */ function render(&$template) // ~X2C { + $contents = parent::render($template); $template->loadTemplateFile(get_class($this).'.html'); $template->setVariable($this->attrs); - $template->setVariable('CONTENTS', parent::render($template)); + $template->setVariable('CONTENTS', $contents); return $template->get(); } // -X2C } // -X2C Class :Generic -?> +?> \ No newline at end of file