Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
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>
|
|
The SQL query here, as written, was omitting 'log' type messages from
the results.
Signed-off-by: Malf Furious <m@lfurio.us>
|
|
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.
|
|
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.
|
|
Added a $limit argument to specify a maximum number of results to
return.
|
|
|
|
Since 'object' is now a reserved word (as of PHP 7.2), I have to rename
this class. I really preferred the name object, but obj will have to
do.
|
|
|
|
This function is needed in the scope of issue, mesgs, and pads alike.
It would also make sense to use this to retrive users' private messages.
For these reasons, this function is now being defined higher up in the
object hierarchy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Added missing calls to function saveObj() where $this is mutated.
|
|
Now returns the correct type of object based on the original object's
parent.
|
|
Added to object class, functions: setOwner, getParent, setParent.
|
|
Also updated the getOwner function to use this instead of duplicating
logic.
|
|
|
|
Functions object::addMember() and object::remMember()
|
|
|
|
The getOwner() function should have had a nullable return type.
|
|
|
|
Setup to perform an iteration of development focused on a simpler
implementation and eliminating redundancy in design.
|
|
|
|
|
|
Increase the scope of this function so it may be used by groups.
|
|
|
|
Added a variety of functions to the Object base class for testing a
user's access level to another object. Also added functions to test
whether a given user or group is an owner or member of another object.
|
|
Added object function to get the owner of an object. This base-class
function returns a User object, however a user might not always be the
kind of owner (eg: a group can own a pad). In these situations, Object
sub-classes should override this function and return the appropriate
type of object.
|
|
Added object function to get an array of all its members. These will
always be user objects, so this is always a safe function to call.
|
|
This function will initialize a new group object and write it to the
database, with a given group name and owner user.
|
|
|
|
Now, on deletion of objects, all refs to it are purged from the xref tables, obj_member and msg_read
|
|
Removed use of PHP's rand() functon in favor of openssl extension's openssl_random_pseudo_bytes() to create blobs with better entropy.
Created function getBlob (from class Object) to get a sha256 hash created from randomness for use as object GUIDs, password salts, application tokens, etc.
|
|
The saveObj() function now initializes and update the timeCreated and timeUpdated fields of objects on its own.
A new function, getCurrentTimestamp() (from class Object) is introduced to aid simpler fetching of the date and time
|
|
|
|
|
|
|
|
|
|
planning to make a class "RawObject" so that objects may be created in a polymorphic way
|
|
|
|
|
|
constructor and loadObj functions)
|