Enabled defaults to ORM::display(), if values dont have a value

This commit is contained in:
Deon George
2015-10-08 16:31:33 +11:00
parent fdd06daed3
commit 01a370dcf2
2 changed files with 5 additions and 2 deletions

View File

@@ -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();