File_thumbnail lacked getUrl function

The only reason it worked was because DB fetches calls to get$varname if
the dataobject has a variable with the specific name. However, it started
blurting out errors that the case must be correct (which would require
'geturl' to be the function name).

Since we probably want to replace DB sometime, we'll just override this
auto-fetching mechanism and use more explicitly defined functions.
This commit is contained in:
Mikael Nordfeldth 2014-04-18 23:06:28 +02:00
parent 28dc361a15
commit 7025817cc1

View File

@ -100,4 +100,9 @@ class File_thumbnail extends Managed_DataObject
$tn->height = intval($height);
$tn->insert();
}
public function getUrl()
{
return $this->url;
}
}