Age | Commit message (Collapse) | Author | Files | Lines |
|
Removing these unnecessary checks. They are not protecting us from
anything, only inconveniencing me in index.php.
|
|
|
|
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.
|
|
This is an alternative function to globals' saveFile(), which allows
model code to just pass in the name of the expected uploaded file,
rather than requiring them to look up the file themselves. This is in
line with my preference to encapsulate PHP superglobals access away from
most of the codebase.
Note that even if the user opts not to upload optional files, the
associated file <input> field will still be present in $_FILES, with a
special error code set (meaning 'no file uploaded') which setFile()
ignores. It is only in the case of a malformed form submission that
$_FILES will be missing the requested file field, prompting Scrott to
throw an exception.
|
|
The input[ ] portion of the hidden field name had been left off. This
commit fixes this bug.
|
|
|
|
|
|
Updated old settings modal design, to incorporate added Scrott features.
Reimplemented this modal in Scrott from archived code and have included
it in the navbar.
|
|
|
|
Similar to objHeadCircle() but for displaying a bg img on page, rather
than as the actual background.
|
|
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.
|
|
This ctrl is not POSTed as part of the input[] array, but as a
standalone name.
|
|
|
|
|
|
|
|
The initial intended use case for this is applying the "active" and "in
active" classes to the first tab to appear in the settings modal.
|
|
|
|
|
|
This is basically a constructor for agent. The actual type returned is
a contrete agent.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
UI module to use when listing out groups and pads. These will link to
the group/pad page and display information about the object.
|
|
Added a $limit argument to specify a maximum number of results to
return.
|
|
|
|
Since several routes will use the current $user as the PAGE_OBJECT, I'm
just setting it once above most of the logic. Any route that needs
something else can change it.
There's a condition in the setPageObj() function that throws if we
attempt to call it more than once. I'm thinking this can be removed
it's not protecting from much.
|
|
|
|
|
|
The intention is for index.php to set this variable. This is the text
(HTML) displayed on the button for the pad select dropdown in the nav
bar. Basically the canonical name of the page we're on.
|
|
Now reloading current path after successful login, instead of
redirecting to app-root.
|
|
Passing no argument (or NULL) now causes this function to redirect to
the 'app-path' (current request page). This is a way to reload the
current page.
|
|
|
|
The check that this commit adds to each of these functions enables users
with all permissions on themselves.
|
|
If the argument doesn't have an owner, then an access error is thrown
when we try to do ->guid. Since there is no owner, just return false.
Otherwise, do the comparision as usual.
|
|
|
|
|
|
|
|
This addresses a problem with most views. They need an object context
to display in. IE what pad, group, etc. are we viewing? This variable
is intended to be set by index.php and referenced by page models.
|
|
|
|
|
|
|
|
|
|
|
|
|