summaryrefslogtreecommitdiffstats
path: root/app/class/obj.class.php (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-03-21Don't remove bg image if it fails to setMalf Furious1-7/+3
This behavior was causing issues in the UI. We normally "try" to set a new asset by default, in case one was provided by the user, and just soft-fail if one wasn't. This "soft-failing" is now resulting in the images being removed if the user just goes in to change his alias (for example). Signed-off-by: Malf Furious <m@lfurio.us>
2019-03-21Update bg image functions to implement an image thumbnailMalf Furious1-10/+47
When setting the bg image for an object, create a copy of it (square-cropped) in dynmic/thumbs/ for display in the settings modal. This patch provides an additional function for retriving the thumbnail's URL as well. This thumbnail is desirable for the sake of the UI. If we cannot make a guarantee as to the aspect ratio of the preview images shown on the user tab of the settings modal, these widgets may appear wrong or go off the screen a bit on smaller devices. Signed-off-by: Malf Furious <m@lfurio.us>
2018-10-31Fix bug in image supportMalf Furious1-0/+1
Adds 'image/x-ms-bmp' as an allowed mimetype for images, and is equivalent to 'image/bmp'. The image module is also updated to expect this new type. I found an image of mine that, when uploaded, PHP thought was 'image/bmp', so it was allowed. However, when cropping, PHP though it was 'image/x-ms-bmp' and failed to lookup a loading/writing function. Signed-off-by: Malf Furious <m@lfurio.us>
2018-10-31Add bmp image supportMalf Furious1-0/+1
Adds 'image/bmp' as an allowed mimetype for images. The image module is also updated to expect this new type. Signed-off-by: Malf Furious <m@lfurio.us>
2018-10-31Add gif image supportMalf Furious1-0/+1
Adds 'image/gif' as an allowed mimetype for images. The image module is also updated to expect this new type. For background images, animated gifs will work properly. For head images, the cropping process truncates the image to only one frame; this is probably for the best. Signed-off-by: Malf Furious <m@lfurio.us>
2018-10-24obj: Fix bug in function getMesgs_ordByDatetime()Malf Furious1-2/+2
The SQL query here, as written, was omitting 'log' type messages from the results. Signed-off-by: Malf Furious <m@lfurio.us>
2018-09-19Update all usage of saveFile()Malf Furious1-8/+7
Update all usage of saveFile() to use added saveIfFile() function, forwarding on the convenience to model code. Model code can pass in file field names, rather than $_FILES arrays directly.
2018-09-16Add function obj::hasHeadImg()Malf Furious1-0/+10
We can check for the existence of an object's background image by calling getBgImg(), since it returns NULL when there is no such image. But getHeadImg() behaves differently, returning a path to 'static/img/null.jpg' (via df.php) when there is no image, making it more difficult to tell. This function addresses this concern.
2018-07-26Update function obj::getMembers()Malf Furious1-2/+7
Added a $limit argument to specify a maximum number of results to return.
2018-02-07Rename object.class.php to reflect name of its classMalf Furious1-0/+286