Commit Graph

100 Commits

Author SHA1 Message Date
Evan Prodromou
81a81baf83 low-level management of blocks
darcs-hash:20081208031008-5ed1f-c96006b5c05fa0e68f9adaacd0518016aedfee2a.gz
2008-12-07 22:10:08 -05:00
Evan Prodromou
a143b64666 edit throttling
darcs-hash:20081210174722-84dde-4c79d7f73230d008195bd19738bc9a6017b940e9.gz
2008-12-10 12:47:22 -05:00
Evan Prodromou
6f31f25105 let users set their own profile tags from profilesettings
darcs-hash:20081120214821-84dde-c8569ef645b389de545f78bf01a270f28b871f02.gz
2008-11-20 16:48:21 -05:00
Evan Prodromou
3b4db8f5e1 whitespace diffs in User.php
darcs-hash:20081120205421-84dde-b41e50386ce3ec5f887c87cd83258c2e0e86f713.gz
2008-11-20 15:54:21 -05:00
millette
f71f2d5ba8 emailnotifynudge added to User.php class manually (how to auto-gen?)
darcs-hash:20081117003010-099f7-dd605b41a28ab99c2fadde38d9c7341bfdae0312.gz
2008-11-16 19:30:10 -05:00
Evan Prodromou
45f5ef8c87 if all faves in cache, skip
darcs-hash:20081122192857-84dde-c8fcddd794a8339a53e6a0224bd07f6f86ef3896.gz
2008-11-22 14:28:57 -05:00
Evan Prodromou
24ad0b3c13 blow last cache for faves
darcs-hash:20081122165234-84dde-d9d6a608434502cb3d5fb09f04d0c641900c3134.gz
2008-11-22 11:52:34 -05:00
Evan Prodromou
5d161f3d24 messed up logic for passing faves
darcs-hash:20081122163552-84dde-9171c5e24ae90a430f2abd78437073656af9e5ec.gz
2008-11-22 11:35:52 -05:00
Evan Prodromou
5632b2e6d5 use cached fave stream to save DB hits for faves
darcs-hash:20081122163347-84dde-abb0dfc800f65f50951c5517af3bfda48013c6ed.gz
2008-11-22 11:33:47 -05:00
Evan Prodromou
16e3fcf2c2 add inboxes for new users
darcs-hash:20081116062937-84dde-2c2369d0513dba49514a6800f67324803d0fe335.gz
2008-11-16 01:29:37 -05:00
Evan Prodromou
5409bd6a5d different query based on config var and user inbox status
darcs-hash:20081113215734-84dde-badae0579fb70a6760dc6fdf0289b76356e479f6.gz
2008-11-13 16:57:34 -05:00
Evan Prodromou
69a1cea319 add inboxed and regenerate data objects
darcs-hash:20081113210209-84dde-56052bac5ce490d54f3220baaa13f5bfc0e7618d.gz
2008-11-13 16:02:09 -05:00
millette
15c1d4f5e4 trac31 url_auto_shortening by sgmurphy
darcs-hash:20081106205926-099f7-6bcfd7969a159a12b1ba6a9ee254e44a07b94761.gz
2008-11-06 15:59:26 -05:00
Evan Prodromou
0625f18c8e notice_inbox.id -> notice_inbox.notice_id
darcs-hash:20081112173627-5ed1f-7cee5b6f25ab654f066c8902492ed531fb1ea091.gz
2008-11-12 12:36:27 -05:00
Evan Prodromou
3987de1064 created timestamp on notice_inbox
darcs-hash:20081112172517-5ed1f-4e8534d7898e2134edf4c0a28417b4a5274617d4.gz
2008-11-12 12:25:17 -05:00
zach
8deac7248e Twitter-compatible API - since_id and before_id were polluting the cache and generating bad SQL
(Also cleaned out some extra whitespace.)

darcs-hash:20081104053359-462f3-2f6619bb942aa34b38dd82cb427878f83d4c332c.gz
2008-11-04 00:33:59 -05:00
Evan Prodromou
561140fbed change User to use notice inboxes rather than subscription
darcs-hash:20081022210445-5ed1f-94a7b172f33411dfa8d1faaf7dc72169f57d6b39.gz
2008-10-22 17:04:45 -04:00
Evan Prodromou
894496f0e8 remove unused noticesWithFriendsWindow from User
darcs-hash:20081022210428-5ed1f-8de35689bfee3b38e6da83328137fb457a0bfdb0.gz
2008-10-22 17:04:28 -04:00
Zach Copley
06a80c829b Another patch to fix up whitespace conflicts in User.php
darcs-hash:20081005181614-7b5ce-4ab236108fe2570a199120317120d921715fbd19.gz
2008-10-05 14:16:14 -04:00
Zach Copley
e115322473 Fixed up conflict (over white space) in User.php
darcs-hash:20081005181350-7b5ce-1e722af0bd3677b27dd6d100456131a42072dd91.gz
2008-10-05 14:13:50 -04:00
Evan Prodromou
5978fcb601 fix deleted function after synch from Zach
darcs-hash:20081004194218-5ed1f-efd9e82c9f78e19185d8ef6b626f46c5ae6613db.gz
2008-10-04 15:42:18 -04:00
mac65
c08a67094c Add support for since_id and before_id to Twitter API. Ticket #540.
darcs-hash:20081001001233-e558a-3fcc269985050021ec9b44c052206c731cc4689d.gz
2008-09-30 20:12:33 -04:00
Evan Prodromou
67cf415b7e don't try to free faves in User
darcs-hash:20081002162739-5ed1f-7d83c69d986cc704ef1bb9703a105ac04ad38d06.gz
2008-10-02 12:27:39 -04:00
Evan Prodromou
37735a35c0 try to use caching functions where possible in User
darcs-hash:20081002162513-5ed1f-fff718be660fa4a8abf58df402a3db30d72d11db.gz
2008-10-02 12:25:13 -04:00
Evan Prodromou
f290ae348a remove unused helper function
darcs-hash:20081002144628-5ed1f-0cf7909fd15d5361d391a9bcde723585d83e5ed3.gz
2008-10-02 10:46:28 -04:00
Evan Prodromou
f5f9559a60 correct some SQL and add some spaces
darcs-hash:20080928174316-5ed1f-73bc071fed0aff359c94b4213816e8830eba6c50.gz
2008-09-28 13:43:16 -04:00
Evan Prodromou
3a99883c6c remove noticewrapper
darcs-hash:20080928171634-5ed1f-5a62d8a16dedeff8a9ed5677b2288c9890a008e7.gz
2008-09-28 13:16:34 -04:00
Evan Prodromou
02a3f24b92 single function for important streams, with memcached support
I moved the 4 streams for a user (with friends, faves, replies,
personal) into functions on the User object. Added a helper function
in Notice for making notice streams. Also, will fetch notice streams
out of the memcached server, if possible. Made the API, RSS, and HTML
output all use the same streams (hopefully cached).

Added some code to Notice to blow the cache when a notice is posted.
Also, added code to favor and disfavor actions to blow the faves
cache, too.

darcs-hash:20080928120119-5ed1f-ead542348bcd3cf315be6f42934353154402eb16.gz
2008-09-28 08:01:19 -04:00
Evan Prodromou
82084ab74c move memcache connections to util.php
darcs-hash:20080926200102-5ed1f-debbc18981424d7724277ac82e5fbfd5e797090e.gz
2008-09-26 16:01:02 -04:00
Evan Prodromou
8da61dc1d3 path correct in require_once for memcached
darcs-hash:20080926161824-5ed1f-b4fb53e5ca65bb099aabbba6ea60a13496f669a2.gz
2008-09-26 12:18:24 -04:00
Evan Prodromou
f6615f70e5 prepend Memcached_DataObject require with INSTALLDIR
darcs-hash:20080926161540-5ed1f-2e9dc6f2297c612208214a6d52f36ce0dd7aa4de.gz
2008-09-26 12:15:40 -04:00
Evan Prodromou
e2e6bbb298 caching layer for DB/DataObject
I added a new class, Memcached_DataObject, that will (optionally)
fetch data out of a memcached server if it's available. This only
works on 'staticGet'.

Methods that write to the database (insert, update, delete) will clear
and set the cache correctly, too.

darcs-hash:20080926160941-5ed1f-922de078b4c1941853ad014edf9a17fae486f8cf.gz
2008-09-26 12:09:41 -04:00
Evan Prodromou
0ee3d6ccb0 user -> this
darcs-hash:20080923181648-5ed1f-a30ef5c24b8b9e49e5c8ba8e023574bb7d9b1ef3.gz
2008-09-23 14:16:48 -04:00
Evan Prodromou
e24425d44e correct a couple of bugs
darcs-hash:20080922190937-5ed1f-9439cd9cff178323ac1445f33e2520260b4b267e.gz
2008-09-22 15:09:37 -04:00
Evan Prodromou
e42de1ccc1 fancy urls for show message, new message
darcs-hash:20080917180244-5ed1f-06e2ac2d8f094eacd12b316794b0599b57d76596.gz
2008-09-17 14:02:44 -04:00
Evan Prodromou
130ba28886 newmessage and showmessage
darcs-hash:20080917174741-5ed1f-c090055487bab0df52d25ad6550d3850ef5f7661.gz
2008-09-17 13:47:41 -04:00
Evan Prodromou
809c4a9d31 rationalize with ciarang's pgsql changes
darcs-hash:20080916214134-84dde-ba11f44676d876cf0f29773c60fa95676ad07ebd.gz
2008-09-16 17:41:34 -04:00
CiaranG
ab68c61a12 PostgreSQL: Quote table name in manually formed query - fixes profile settings update
darcs-hash:20080915070256-f6e2c-344d1ca1ca158b9ab5f558804ad129c1ef9d6a7a.gz
2008-09-15 03:02:56 -04:00
CiaranG
26634ef0a0 Initial support for PostgreSQL
darcs-hash:20080909072224-f6e2c-881bd2e7fb032f336fecae9ca5ce527dd821d3dc.gz
2008-09-09 03:22:24 -04:00
Zach Copley
6eb84f0f03 Disallow 'api' nickname
darcs-hash:20080909000650-7b5ce-c7eb990db81620b83201c0e361af9dfcdd9c2b89.gz
2008-09-08 20:06:50 -04:00
Evan Prodromou
4476a4286f rationalize with repository version
darcs-hash:20080916174400-84dde-63781c5cd6a7c9a3dbc765dfa15084e3372effd5.gz
2008-09-16 13:44:00 -04:00
Evan Prodromou
a8a3667774 initial non-Ajax version of favorites
darcs-hash:20080908181624-84dde-8200e1d91eb5f560ef0f296c9e1c56f93ef1b0c5.gz
2008-09-08 14:16:24 -04:00
Evan Prodromou
79f4469db9 Invite -> Invitation
darcs-hash:20080827010515-84dde-f4dd776209a0aa4f6a7e9d6ac1de46d83ff54650.gz
2008-08-26 21:05:15 -04:00
Evan Prodromou
e248066b74 updates for invitations
Add the code to registration to handle invitation codes.

Some edge cases on invitations: is the user already subbed to this
person? Tell them. Is the person already on the system? Sub the user
to them, then, and tell the user.

Add some code to User to auto-sub invitees whenever the email address
changes. Call it from a new registration with an invite code, and also
from confirmaddress.

Some whitespace cleanup in the files touched.

darcs-hash:20080827001927-84dde-b50e5d921ca3f2fb894821730ff93cac09d2ba66.gz
2008-08-26 20:19:27 -04:00
Evan Prodromou
d53a4123f3 can actually take all the data in the window
darcs-hash:20080920174700-84dde-a00751e0eafd9adc4580924bb41c11b0649b7fe5.gz
2008-09-20 13:47:00 -04:00
Evan Prodromou
7334add156 compress window-getting to one function
darcs-hash:20080915071835-84dde-173e6afde44c3348c3314c638e2a67dfb333c011.gz
2008-09-15 03:18:35 -04:00
Evan Prodromou
1806469ba2 $INSTALLDIR -> INSTALLDIR
darcs-hash:20080915070413-84dde-5e942675dec105b297889a58ea770fb4b337307d.gz
2008-09-15 03:04:13 -04:00
Evan Prodromou
f246b8f2d7 cache noticesWithFriends in memcached
noticesWithFriends is turning out to be one of our most expensive
queries. The join is costly, and this method is hit over and over and
over by desktop clients and other API users.

So, I've added a first pass at caching the results. I store a "window"
of notices -- equal to the first 3 pages of notices, plus one for
pagination -- in the memcached cache. If with-friends notices are
requests, I fetch the whole window out of the cache and grab the slice
requested. If the requested notices are outside the window, we just do
the query. If there's nothing in the cache, we request the window and
store it, then return a slice.

I had to add a NoticeWrapper class that works like DB_DataObject
(well, just the fetch() part...) but just holds an array of notices
instead of a DB cursor.

Finally, saving a new notice blows away the caches for subscribed users.

darcs-hash:20080915065616-84dde-1b1e814c2294498a10b763b779cbb62c3f96aa84.gz
2008-09-15 02:56:16 -04:00
Ori Avtalion
77a96747d7 Disallow 'tag' and 'tags' as usernames. Fixes ticket #584
darcs-hash:20080905114534-57fc3-feee793696ddf3d5bbb1ae7f326d9d88dc961e60.gz
2008-09-05 07:45:34 -04:00
Evan Prodromou
08a3c5ac7f use better SQL date, fix security problem with OpenID logins
darcs-hash:20080825184104-84dde-5735c1791002a12c3417603dc85da31ea868f263.gz
2008-08-25 14:41:04 -04:00