From: Mikael Nordfeldth Date: Fri, 18 Apr 2014 21:06:28 +0000 (+0200) Subject: File_thumbnail lacked getUrl function X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7025817cc14cae1f566b48b97e8f6f511224f8ed;p=quix0rs-gnu-social.git 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. --- diff --git a/classes/File_thumbnail.php b/classes/File_thumbnail.php index 04c9774bf5..7c0f7477e5 100644 --- a/classes/File_thumbnail.php +++ b/classes/File_thumbnail.php @@ -100,4 +100,9 @@ class File_thumbnail extends Managed_DataObject $tn->height = intval($height); $tn->insert(); } + + public function getUrl() + { + return $this->url; + } }