summaryrefslogtreecommitdiffstats
path: root/app/class/obj.class.php (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
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/+0
2018-02-07Rename object classMalf Furious1-5/+5
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.
2017-06-19Add object function arrayUnique()Malf Furious1-0/+26
2017-06-04Move function getMesgs() into object classMalf Furious1-0/+18
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.
2017-04-19Add object function getBgImg()Malf Furious1-0/+12
2017-04-19Add object function rmBgImg()Malf Furious1-0/+12
2017-04-19Add object function setBgImg()Malf Furious1-0/+12
2017-04-19Add object function getHeadImg()Malf Furious1-0/+8
2017-04-19Add object function rmHeadImg()Malf Furious1-0/+12
2017-04-19Add object function setHeadImg()Malf Furious1-0/+32
2017-04-09Fix bugs in object classMalf Furious1-0/+2
Added missing calls to function saveObj() where $this is mutated.
2017-04-07Update function getParent()Malf Furious1-1/+2
Now returns the correct type of object based on the original object's parent.
2017-03-26Add functions for object hierarchy mgmtMalf Furious1-0/+28
Added to object class, functions: setOwner, getParent, setParent.
2017-03-26Add function object::typeOf()Malf Furious1-3/+10
Also updated the getOwner function to use this instead of duplicating logic.
2017-03-26Rm unnecessary, circular requires from the object class fileMalf Furious1-3/+0
2017-03-26Add functions for adding and removing object membersMalf Furious1-0/+30
Functions object::addMember() and object::remMember()
2017-02-06Update table class tree to use static database referencesMalf Furious1-2/+2
2017-02-04Fix to object class function signatureMalf Furious1-1/+1
The getOwner() function should have had a nullable return type.
2017-01-16Add object classMalf Furious1-0/+89
2016-10-22Deprecate application codeMalf Furious1-640/+0
Setup to perform an iteration of development focused on a simpler implementation and eliminating redundancy in design.
2016-09-18Move function User::rmHeadImage() to Object classMalf Furious1-0/+11
2016-09-17Add function Object::getURL()Malf Furious1-0/+8
2016-09-13Move function User::getHeadImage() to Object classMalf Furious1-0/+8
Increase the scope of this function so it may be used by groups.
2016-06-10Fix typoMalf Furious1-1/+1
2016-06-10Add functions to Object class to determine user permissionsMalf Furious1-0/+313
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.
2016-06-08Add function Object::getOwner()Malf Furious1-0/+12
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.
2016-06-08Add function Object::getMembers()Malf Furious1-0/+16
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.
2016-06-01Add function Group::createNewGroup()Malf Furious1-0/+2
This function will initialize a new group object and write it to the database, with a given group name and owner user.
2016-05-26Add copyright notice to Scrott class filesMalf Furious1-0/+14
2016-03-01Add garbage collection logic to Object::delObj()Malf Furious1-0/+8
Now, on deletion of objects, all refs to it are purged from the xref tables, obj_member and msg_read
2016-01-30Update app source of entropy for creating random blobsMalf Furious1-2/+9
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.
2016-01-30Handle object timestamps automatically in Object::saveObj()Malf Furious1-0/+14
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
2015-12-18+ Added DBObject class -- A non-abstract version of Object classMalf Furious1-0/+15
2015-12-18* now using rand() instead of random_bytes for numbersMalf Furious1-1/+1
2015-12-18+ Implemented Object::getNewGUID function for Object classMalf Furious1-0/+15
2015-12-18+ Added function "isGUID" to object class for checking whether GUIDs existMalf Furious1-0/+17
2015-12-18* Defined some default values for function parameters for object class -- ↵Malf Furious1-2/+2
planning to make a class "RawObject" so that objects may be created in a polymorphic way
2015-12-18+ Added delObj function to object classMalf Furious1-0/+17
2015-12-18+ Added saveObj function to Object classMalf Furious1-1/+93
2015-12-17+ Added abstract base class for Scrott database objects (implemented ↵Malf Furious1-0/+71
constructor and loadObj functions)