summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2010-12-06Config flag to disable router caching if neededEvan Prodromou
2010-12-06use Cache::codeKey() in Router classEvan Prodromou
2010-12-06Make code-dependent cache entries more volatileEvan Prodromou
If a cache entry is dependent on the code that's running, upgrading (or enabling/disabling plugins) can generate hard-to-track inconsistencies. This change adds a close-to-unique fingerprint of the running code to some cache keys, so that if the fingerprint changes, the old values are ignored and new values are used. If the automated uniqueness fails, an administrator can add an extra config value, $config['site']['build'], that's thrown into the key also.
2010-12-06Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.xEvan Prodromou
2010-12-06correctly generate enclosure in Activity::asString()Evan Prodromou
2010-12-06Merge branch 'master' of gitorious.org:statusnet/mainline into 0.9.xBrion Vibber
Conflicts: classes/User.php
2010-12-06Added User::singleUserNickname() as (temporary?) fallback for single-user ↵Brion Vibber
lookup as a workaround for site setup of 1user sites. We found that an external tool attempting to spin up StatusNet and then register the user would fail because StatusNet's router setup dies on being unable to find its single-user account, since the nickname is needed in setting up routing entries. This tweak will let it survive, using the configured setting as a fallback if it can't actually find the user account.
2010-12-06remove common_debug() from Activity::asString()Evan Prodromou
2010-12-05Convert Notice::asAtomEntry() to use Notice::asActivity() and ↵Evan Prodromou
Activity::asString() We had two ways to generate an activity entry from a notice; one through Notice::asAtomEntry() and one through Notice::asActivity() and Activity::asString(). The code paths had already diverged somewhat. I took the conditions that were in Notice::asAtomEntry() and made sure they were replicated in the other two functions. Then, I rewrote Notice::asAtomEntry() to use the other two functions instead. This change passes the ActivityGenerationTests unit tests, but there may be some other stuff that's not getting covered.
2010-12-02Fix for tickets #2917, #2262: user URL shortening options not being applied ↵Brion Vibber
in non-web channels common_shorten_links() can only access the web session's logged-in user, so never properly took user options into effect for posting via XMPP, API, mail, etc. Adds an optional $user parameter on common_shorten_links(), and a $user->shortenLinks() as a clearer interface for that. Tweaked some lower-level functions so $user gets passed down -- making the $notice_id param previously there for saving URLs at notice save time generalized a little. Note also ticket #2919: there's a lot of duplicate code calling the shortening, checking the length, and reporting near-identical error messages. These should be consolidated to aid in code and translation maintenance.
2010-12-01Fix dumb mistake -- changed function names partway through writing Nickname ↵Brion Vibber
and forgot to update a couple places. :)
2010-11-30Merge branch 'master' into 0.9.xEvan Prodromou
Conflicts: lib/router.php
2010-11-30was using Cache::get() and ::set() wrongEvan Prodromou
2010-11-30use a CRC32 of the plugin names rather than actual namesEvan Prodromou
2010-11-30use a CRC32 of the plugin names rather than actual namesEvan Prodromou
2010-11-30Squashed commit of the following:Evan Prodromou
commit 39fdd181d95d2c39a3ea1ca330b10a99a92b961f Author: Evan Prodromou <evan@status.net> Date: Mon Nov 29 10:37:49 2010 -0500 use cache key prefix for router cache key commit 4cb9e56941922489b83d6425c059cf770991e68f Author: Evan Prodromou <evan@status.net> Date: Mon Nov 29 10:31:21 2010 -0500 use a unique hashkey based on the software version and loaded plugins commit 44458b48aef719543e11f83b41fded65cbcb8be9 Author: Evan Prodromou <evan@status.net> Date: Sat Nov 27 17:04:15 2010 -0500 cache the NUM object commit 809c188307a9b4ada15f3d7fa573a6034341efef Author: Evan Prodromou <evan@status.net> Date: Sat Nov 27 15:44:12 2010 -0500 accelerate routing by pivoting paths on actions
2010-11-30Squashed commit of the following:Evan Prodromou
commit 39fdd181d95d2c39a3ea1ca330b10a99a92b961f Author: Evan Prodromou <evan@status.net> Date: Mon Nov 29 10:37:49 2010 -0500 use cache key prefix for router cache key commit 4cb9e56941922489b83d6425c059cf770991e68f Author: Evan Prodromou <evan@status.net> Date: Mon Nov 29 10:31:21 2010 -0500 use a unique hashkey based on the software version and loaded plugins commit 44458b48aef719543e11f83b41fded65cbcb8be9 Author: Evan Prodromou <evan@status.net> Date: Sat Nov 27 17:04:15 2010 -0500 cache the NUM object commit 809c188307a9b4ada15f3d7fa573a6034341efef Author: Evan Prodromou <evan@status.net> Date: Sat Nov 27 15:44:12 2010 -0500 accelerate routing by pivoting paths on actions
2010-11-29Normalize username strings in command parsingBrion Vibber
2010-11-29General code safety: validate input and escape SQL strings in ↵Brion Vibber
common_relative_profile()
2010-11-29Use Nickname::DISPLAY_FMT instead of manual regex fragments in router setup ↵Brion Vibber
for nickname parameters.
2010-11-29Add Nickname test cases for @-reply regexes in common_find_mentionsBrion Vibber
2010-11-29Nickname class to encapsulate validation & common regexes for nickname formats.Brion Vibber
This provides initial infrastructure for decoupling display names from internal canonical names, but continues to have us storing and using the canonical forms. It should be/become possible to provide mixed-case and underscore-containing names in links, @-mention, !-group, etc, but we don't store those alternate forms generally.
2010-11-29Work in progress on nickname validation changes. lib/nickname.php appears to ↵Brion Vibber
have been destroyed by NetBeans and will be rewritten shortly. Sigh.
2010-11-29Add some doc comments on nickname-related stuff in util.phpBrion Vibber
2010-11-26Make userxrd work without OStatus enabledEvan Prodromou
2010-11-26Make userxrd part of the default hostmetaEvan Prodromou
2010-11-26Move user xrd action to core and use hooks to extendEvan Prodromou
Moved the Webfinger user XRD action from the OStatus plugin to core. Added hooks to add OStatus-specific stuff, but kept general stuff in the core.
2010-11-26move xrd and hostmeta out of the OStatus plugin and into coreCraig Andrews
add event for setting up hostmeta, and use them in the OStatus plugin
2010-11-19Merge branch 'master' into 0.9.xBrion Vibber
2010-11-19Fix ticket #2700: some numeric IDs were misinterpreted as hex numbers ↵Brion Vibber
instead of strings when '0x123' passed in. Switched from is_numeric() to a custom self::is_decimal() which is more strict. This makes our behavior match Twitter's API a bit better, so eg this: http://identi.ca/api/statuses/home_timeline/0x6d686b.xml should now be equivalent to: http://identi.ca/api/statuses/home_timeline.xml?screen_name=0x6d686b instead of: http://identi.ca/api/statuses/home_timeline.xml?user_id=7170155
2010-11-19Ticket #2797: replace addslashes() with explicit escape calls on the DB objectsBrion Vibber
2010-11-19Merge branch 'master' into 0.9.xBrion Vibber
2010-11-19Ticket #1987: support since_id on API notice search methods.Brion Vibber
max_id is not yet implemented, as it'll need support added to the search backends. (since_id we get 'for free' by just cropping off the list, it'll do for now)
2010-11-19Merge branch 'master' of gitorious.org:statusnet/mainline into 0.9.xBrion Vibber
2010-11-19Ticket #2899: clean up inbox/outbox DM form a bit:Brion Vibber
- "To" drop-down list now defaults to showing "Select recipient:" instead of the first person on your list, reducing liklihood of accidentally sending a message to the wrong person. - When there are no mutual subscribers to send to, instead of an empty list the list now shows 'No mutual subscribers.' In both cases, attempting to send when the default is selected displays an error message. I'm not disabling form elements in part because our themes right now don't show disabled button state correctly; we might want to tighten that up a bit more once fixed.
2010-11-19Merge branch 'master' of gitorious.org:statusnet/mainline into 0.9.xBrion Vibber
2010-11-18Fix regression in PopularNoticeSection: tag parameter was broken, causing ↵Brion Vibber
sidebar on tag pages to show untagged favorites.
2010-11-17Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.xZach Copley
2010-11-17Facebook: Gracefully handle disconnectionZach Copley
2010-11-17Add $config['attachments']['process_links'] to allow disabling processing of ↵Brion Vibber
mentioned URL links for attachment info (oEmbed lookups) and dereferencing of redirects that we didn't have shortened ourselves. This option may be useful for intranet sites that don't have direct access to the internet, as they may be unable to successfully fetch those resources.
2010-11-17include full updated source of JSON2 and use updated minified versionEvan Prodromou
2010-11-17use minified version of jquery.cookie.jsEvan Prodromou
2010-11-17use minified version of jquery.form.jsEvan Prodromou
2010-11-17Merge branch '0.9.x' into minifyjsEvan Prodromou
2010-11-17move EndScriptMessages event into if blockEvan Prodromou
2010-11-17Use minified version of util.jsEvan Prodromou
2010-11-16Merge branch 'master' into 0.9.xBrion Vibber
2010-11-16Ticket 2895: exclude silenced users from popular notice listsBrion Vibber
2010-11-16Prep for ticket #2895: consolidate common code from PopularNoticeList and ↵Brion Vibber
FavoritedAction for fetching popular notice lists
2010-11-16Fix syntax errorZach Copley