Commit graph

670 commits

Author SHA1 Message Date
Joshua Sherman
0c3b239417 Updated preg_match to preg_replace_callback
Was throwing a deprecation error, figured it's worth fixing.
2014-01-22 12:31:57 -05:00
Joshua Sherman
d8e6c43868 Added sanity check for loggable_query variable 2014-01-22 12:23:56 -05:00
Joshua Sherman
ed90ee3501 Fixed issue with profilers always being to true 2014-01-22 11:56:17 -05:00
Joshua Sherman
8752540f31 Fixed the case sensitivity issue on this branch.
Just a bug fix, happened months ago but I deleted the branch.
2014-01-17 10:50:59 -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
Josh Sherman
1cd58e2cef Rolled back alleged invalid UTF sequence fix. 2013-03-13 13:32:27 -04:00
Josh Sherman
e02890b97a Checked server count before trying to close
Was throwing an error, probably should wrap it in a try/catch but better to suppress the action entirely
2013-03-07 15:48:08 -05:00
Josh Sherman
85e3119ed1 Reworked Cache to use a server pool
Updated the error handler to allow for better failover during connection errors. Even in a single server setup, still using addServer as it uses passive connections and eliminated the need for an open method.
2013-03-07 14:57:41 -05:00
Josh Sherman
bf941c023f Fixed jar 2013-02-28 16:27:33 -05:00
Josh Sherman
a0074337a3 Reverted cache layer 2013-02-28 16:26:25 -05:00
Josh Sherman
026c8137e9 Added Redis support to Cache layer 2013-02-28 15:14:10 -05:00
Josh Sherman
6a1cf8c035 Working on the caching
Not sure how I got back on the master branch, meh.
2013-02-28 12:24:02 -05:00
Josh Sherman
684ff2fef1 Starting adding Redis support to Cache class 2013-02-26 18:24:43 -05:00
Josh Sherman
07d00289a1 Added a flag to resolve UTF-8 sequence errors 2013-02-26 16:07:14 -05:00
Josh Sherman
d25b042d8e Revert "Reworked Database stuff to be Datastore stuff"
This reverts commit ebd0018473.
2013-02-26 15:14:17 -05:00
Josh Sherman
ebd0018473 Reworked Database stuff to be Datastore stuff
Wanted a generic grouping for all datastores so there's a place for memcached and redis.
2013-02-26 10:15:52 -05:00
Josh Sherman
df0ef6d959 Reworked sessions and added Redis handler
Requires phpredis to be installed.
2013-02-20 19:03:51 -05:00
Josh Sherman
650c16efae Removed session_start in controller, removed exception from Security class
Security class doesn't need to bark so much, just fail and move on
2013-02-20 11:38:16 -05:00
Josh Sherman
b4eb28f945 Added logic to NOT start sessions for bots 2013-02-20 11:25:04 -05:00
Josh Sherman
78a9d0dda5 Went back to connect
Adjusted server a bit, shouldn't need pconnect any longer
2013-02-19 19:28:28 -05:00