mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 10:22:18 +00:00
- Renamed TemplateLib to WidgetLib
- Updated controllers and views to use WidgetLib - Removed TempleteLib from autoload config file - Removed loading of session library from FHC_Controller (already present in the autoload configuration file)
This commit is contained in:
@@ -24,12 +24,10 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
if (!defined("BASEPATH"))
|
||||
exit("No direct script access allowed");
|
||||
if (!defined("BASEPATH")) exit("No direct script access allowed");
|
||||
|
||||
class TemplateLib
|
||||
class WidgetLib
|
||||
{
|
||||
|
||||
/* default values */
|
||||
private $_template = 'template';
|
||||
private $_parser = FALSE;
|
||||
@@ -604,26 +602,29 @@ class Partial
|
||||
|
||||
class Widget extends Partial
|
||||
{
|
||||
|
||||
/* (non-PHPdoc)
|
||||
* @see Partial::content()
|
||||
*/
|
||||
public function content() {
|
||||
if (!$this->_cached) {
|
||||
if (method_exists($this, 'display')) {
|
||||
// capture output
|
||||
ob_start();
|
||||
$this->display($this->_args);
|
||||
$buffer = ob_get_clean();
|
||||
|
||||
// if no content is produced but there was direct ouput we set
|
||||
// that output as content
|
||||
if (!$this->_content && $buffer) {
|
||||
$this->set($buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return parent::content();
|
||||
}
|
||||
}
|
||||
/* (non-PHPdoc)
|
||||
* @see Partial::content()
|
||||
*/
|
||||
public function content()
|
||||
{
|
||||
if (!$this->_cached)
|
||||
{
|
||||
if (method_exists($this, 'display'))
|
||||
{
|
||||
// capture output
|
||||
ob_start();
|
||||
$this->display($this->_args);
|
||||
$buffer = ob_get_clean();
|
||||
|
||||
// if no content is produced but there was direct ouput we set
|
||||
// that output as content
|
||||
if (!$this->_content && $buffer)
|
||||
{
|
||||
$this->set($buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return parent::content();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user