Enabled defaults to ORM::display(), if values dont have a value
This commit is contained in:
@@ -190,10 +190,13 @@ abstract class lnApp_ORM extends Kohana_ORM {
|
||||
/**
|
||||
* Return a formated columns, as per the model definition
|
||||
*/
|
||||
public function display($column) {
|
||||
public function display($column,$default='') {
|
||||
// Trigger a load of the record.
|
||||
$value = $this->__get($column);
|
||||
|
||||
if (! $value)
|
||||
$value = $default;
|
||||
|
||||
// If some of our fields need to be formated for display purposes.
|
||||
if (! $this->_formated AND $this->_display_filters)
|
||||
$this->_format();
|
||||
|
Reference in New Issue
Block a user