summaryrefslogtreecommitdiffstats
path: root/app/class/table.class.php (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-09-07Fix bug in function table->loadObj()Malf Furious1-1/+7
If a table query yeilds zero rows, we would still attempt to load the first (index zero) into $this, causing an error to be thrown by PHP. We are now checking the size of the results array first.
2017-04-14Fix bug in table function saveObj()Malf Furious1-0/+2
Added call to refreshObj() to the end of function saveObj() to fetch all default values defined by the database, not set on the object in PHP.
2017-04-14Revert "Fix bug in table function saveObj()"Malf Furious1-3/+0
This reverts commit e7228676ce51bf69cc974fc0bd8f8135c51fd036.
2017-04-13Fix bug in table function saveObj()Malf Furious1-0/+3
While creating new objects, some default values (defined in the database schema) are missing in the PHP object definition. To address this, now while saving any *new* database objects, all undefined, expected fields are set to the empty string "".
2017-04-13Add table function refreshObj()Malf Furious1-0/+9
2017-02-07Add function expectType() to table classMalf Furious1-0/+15
protected function exceptType added for use by subclasses to assert that the database object loaded is the correct type and to protect against cases like EG: passing the GUID for a group to new user(...); If a problem is detected, throw an exception.
2017-02-06Update function signatures for table classMalf Furious1-10/+10
Various function (and their usages) in the table class have been updated to be static class function.
2017-02-06Update table class tree to use static database referencesMalf Furious1-24/+20
2017-02-05Remove custom exception 'databasekeyexception'Malf Furious1-9/+7
Just use a generic exception in these cases. I don't want to handle these any differently, and just fall back on the main Exception() error page once we get to a UI.
2017-01-17Add helper functions to table classMalf Furious1-0/+39
2017-01-15Add table classMalf Furious1-0/+173