Commit graph

835 commits

Author SHA1 Message Date
Joshua Sherman
a050c7d031 Hacked in some public variables
Very hacky, switched variables to public and added a catch in the __get method to assign to the right place for the variables that modules are using (instead of having to update all of the modules in the wild)
2013-12-28 16:22:22 -05:00
Joshua Sherman
a4bf33cce2 If no request, assume 'home' module
Eliminates the need to define a default module in the config.
2013-12-28 16:21:24 -05:00
Joshua Sherman
e0228a9e8a Updated to use composer.json
Throwing errors about my command, figured it's best to just use the same thing I'm using locally. Really hope that this is something that can be done.
2013-12-28 02:09:53 -05:00
Joshua Sherman
e70f31c711 Moved to composer installed vfsSteam
Seems the issue was namespacing this whole time.
2013-12-28 02:08:10 -05:00
Joshua Sherman
fd157c23bc Just a bit more... 2013-12-28 01:54:21 -05:00
Joshua Sherman
054ac575e1 Debugging stuff 2013-12-28 01:52:00 -05:00
Joshua Sherman
a1d9f87a4f More tweaking. 2013-12-28 01:49:52 -05:00
Joshua Sherman
5d14f78d29 More hacking to get vfsStream to load in Travis 2013-12-28 01:44:30 -05:00
Josh Sherman
2dad337c8d Fixed composer require command 2013-12-28 01:39:33 -05:00
Josh Sherman
6b0fed32c6 Added dependencies
Added a hack to work locally for me. May move to using composer to obtain / install vfsStream just didn't like the "vendor" directory, will look into using a custom directory so it can be hidden git ignored.
2013-12-28 01:36:08 -05:00
Josh Sherman
7c4e939e6e Added status image and proper script in config
Expecting a failure due to PEAR dependencies failing.
2013-12-28 01:24:16 -05:00
Josh Sherman
6bca74f155 Added travis config 2013-12-28 01:17:00 -05:00
Josh Sherman
07a95a7508 Built out new Display class with tests
Not hooked up to the Controller yet, wanted to get Travis setup.
2013-12-28 01:13:02 -05:00
Josh Sherman
99a04865e8 Fixed existing tests
Just some small tweaks to get all of the tests passing again. Functionality changed and the tests were not kept up to date.
2013-12-26 15:01:05 -05:00
Josh Sherman
408f3cdfa3 Merge branch 'master' of github.com:joshtronic/pickles 2013-12-24 17:38:51 -05:00
Josh Sherman
89dabbf7f5 Fixed case sensitivity issue.
When developing on OS X the case sensitivity didn't matter much but on Linux it broke the include.
2013-12-24 17:36:10 -05:00
Josh Sherman
ae66815cb9 Hacked in pretty JSON option
Just need to include `?pretty=true` to a request and the JSON returned will be formatted. As I was digging in there I think I may consolidate all of the Display logic into a single class and potentially bring back `.json` and `.xml` extensions to dictate what is returned. Would help a ton in scenarios where I have an endpoint that I want to server up a template on error or return JSON on success.
2013-12-24 14:17:03 -05:00
Josh Sherman
cce87a104e Stated intentions for being bleeding edge. 2013-12-24 13:59:21 -05:00
Josh Sherman
9b297f3d87 Dropped Convert::toJSON()
In an effort to only maintain compatibility with the latest version of PHP (currently the 5.5 branch) I dropped the sanity checks if `json_encode` was available as it is always available in PHP 5.2+. Dropping this sanity check also allowed me to remove the wrapper function and the `JSON_AVAILABLE` constant. Ideally I'd like to move towards dropping the `Convert` class entirely but will need a way to convert an array to XML as the `RSS` class still leverages it. One thought is to move that code right into the `RSS` class as it never gets used elsewhere because XML is gross.
2013-12-24 13:28:49 -05:00
Josh Sherman
0cbc1df48f Added AreYouAHuman.com integration
Includes AYAH v1.1.7, a static wrapper class and an update to our main include file to handle loading the official AYAH library from the vendors directory.
2013-12-23 19:11:01 -05:00
Josh Sherman
d96181c60f Q4 2013, seemed like a good time to update the copyright notices 2013-11-04 17:36:04 -05:00
Josh Sherman
058e22c1aa Made method public and fixed return 2013-10-02 15:59:48 -04:00
Josh Sherman
8f57077ef6 Created a validation class to handle validation
Instead of making the Module the keeper of validation, moved the actual sanity checks to another class. This makes it stupid easy to use one module's validation (some or all) to validate arbitrary values elsewhere in your system.
2013-09-29 15:51:45 -04:00
Josh Sherman
011f9b42b2 Updated to not store empty cache
Primary key queries should not be cached because the record may not exist today but could exist in the future and because the INSERT logic in PICKLES doesn't do any invalidation of the cache.
2013-09-27 13:40:44 -04:00
Josh Sherman
7ed930d278 Fixed issue when passing in single IDs
If you tried to use the extended array syntax to query against the primary key (id) and passed it an integer instead of an array, an error was occurring. Thanks @geoffoliver !
2013-09-22 22:48:07 -04:00
Josh Sherman
6ac911b78a Sort class!!~! 2013-09-22 19:40:49 -04:00
Josh Sherman
dd6ba92e28 Added utility method to extract values from field
Pass it a field name, it'll return an array of all of the values form that field.
2013-09-16 12:59:16 -04:00
Josh Sherman
38e5173823 Updated checks for exactly false.
Fixed some issue withe the sanity checks if the cache results.
2013-09-15 23:32:34 -04:00
Josh Sherman
919ad37717 Added arbitrary cache usage by key.
Pass a Model an optional second or third parameter to force the Model to check the cache before running the query and stashing the results in the key for future queries.
2013-09-15 17:15:22 -04:00
Josh Sherman
6b41edf659 Moved default cache expiration to 1 day
Not quite ready to make the jump to no expiration, but 1 day has been serving me well for over a year now.
2013-09-15 12:38:32 -04:00
Josh Sherman
dca62b82d1 Removed unnecessary sanity checks when calling Log 2013-09-15 12:02:07 -04:00
Josh Sherman
b6bacdd432 Caching where primary key in ( ... )
Caching was limited to single row selects against the primary key. Expanded to include cache checking and storing when selecting multiple values against the primary key. Does not work on any other row due to the fact that some rows may have duplicate values and the mapping could get borked pretty quick.
2013-09-15 11:56:34 -04:00
Josh Sherman
7746567ec3 Added sanity check if logging was enabled
No more wrapping calls to the Log class with a check if it's enabled.
2013-09-15 11:55:56 -04:00
Josh Sherman
391e95c9e8 Reverted per column caching aside from id field.
Was a bit messy, just so hard to automagically cache stuff without knowing the data usage.
2013-09-13 13:22:10 -04:00
Josh Sherman
4d9eb54b13 Dropped dot syntax
Too much juggling to make sure the proper assets were loaded. Opened up a security issue that allowed some pages to be accessed even if data was missing, just a headache, best to move away from it and allow users to defining custom routing in inde.php. Perhaps down the road allowing a Route class that the user can define everything in.
2013-09-12 17:59:29 -04:00
Josh Sherman
d671cfa977 Hardcoded email, whoops. 2013-09-12 09:49:19 -04:00
Josh Sherman
4819b2c1a2 Added sanity check for variable
I like to remove the password field from records when I'm not using the password value, this caused an error when creating the cache keys.
2013-09-11 10:28:38 -04:00
Josh Sherman
9dcf3fa58e Added column caching
If you're pulling data against a single column and returning a single column the UID will be cached out to a key that can easily be recalled the next time the same query is executed. On UPDATE and DELETE the corresponding keys are deleted.
2013-09-10 22:43:52 -04:00
Josh Sherman
72c9e85f5d Added the template variable to the new scope logic 2013-09-10 19:57:23 -04:00
Josh Sherman
53236e2c8e New variable scope inside of templates
Now can access stuff as part of $this. Example: $__form->dobSelect() is now $this->form->dobSelect(). Both syntaxes are valid to allow for some migration time away from the old syntax
2013-09-10 19:50:16 -04:00
Josh Sherman
2ac7790385 Cleaned up some old code.
Still had some <br />'s in there and updated some of the redirects to use the Browser class.
2013-09-09 16:08:10 -04:00
Josh Sherman
1a0f66cc9c Dot syntax URIs weren't erroring correctly
Instead of routing to a 404 or home, was just returning [] (empty JSON array). Updated to redirect home for the time being. 404 handling needs to be addressed soon anyway, it's kinda junk right now
2013-09-09 16:05:52 -04:00
Josh Sherman
050871ebe6 Added method to generate a Gravatar img 2013-09-09 14:22:59 -04:00
Josh Sherman
f2835252bd Fixed a typo 2013-09-08 18:30:14 -04:00
Josh Sherman
b1bd69968e Got rid of the jar of PICKLES
It's a bitch to debug and at this point, I'm unsure that there's really any performance improvement by including everything. Also when moving towards namespacing in future revisions, having all of the PHP in a single file is a no-go.
2013-09-08 18:27:34 -04:00
Josh Sherman
ae188a82a6 Added third option to determine if regex needs to match or not match.
Also fixed a bug where errors were overwriting eachother
2013-09-08 14:31:55 -04:00
Josh Sherman
94a9e08661 In module input validation logic 2013-09-08 13:56:07 -04:00
Josh Sherman
8cd9c31508 Added dynamic prefix to the Redis session handler 2013-06-17 18:09:26 -04:00
Josh Sherman
5cb8cb5203 Dropped cursor:help and swapped ellipsis 2013-04-27 17:50:22 -04:00
Josh Sherman
73ae91d629 Strip HTML comments sans "BuySellAds"
Having an issue getting BSA to validate my site. Attempting to leave those HTML comments in place in an effort to resolve the issue.
2013-04-17 12:06:53 -04:00