Brion Vibber [Mon, 29 Nov 2010 22:46:10 +0000 (14:46 -0800)]
Nickname class to encapsulate validation & common regexes for nickname formats.
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.
Brion Vibber [Mon, 29 Nov 2010 19:31:33 +0000 (11:31 -0800)]
Start on some nickname-validation test cases: several of these fail right now because we had regressions in 0.8 or 0.9 where we lost normalization of uppercase and some other chars.
Brion Vibber [Wed, 24 Nov 2010 18:13:03 +0000 (10:13 -0800)]
Add LogFilter plugin: quickie way to filter out/in log output based on priority or keyword matches. Should be helpful for folks who can't easily adjust their syslog filtering.
Brion Vibber [Tue, 23 Nov 2010 17:28:47 +0000 (09:28 -0800)]
Fixes for Twitter bridge breakage on 32-bit servers. New "Snowflake" 64-bit IDs have become too big to fit in the integer portion of double-precision floats, so to reliably use these IDs we need to pull the new string form now.
Machines with 64-bit PHP installation should have had no problems (except on Windows, where integers are still 32 bits)
Brion Vibber [Mon, 22 Nov 2010 19:10:10 +0000 (11:10 -0800)]
Fixes for delete_status_network.sh:
* add some sanity checking: abort on failures instead of plodding through
* add some progress / error output
* fetch the target database server name from the status_network entry and use that to target the DROP DATABASE
Note that database names and other overrides in status_network entry may still not be seen.
Brion Vibber [Fri, 19 Nov 2010 23:51:08 +0000 (15:51 -0800)]
Ticket #2724: gracefully handle attempts to delete or fave/unfave a remote Twitter notice if a failure occurs.
Most annoying error case being where the notice was already faved or deleted on Twitter! :)
Such errors will now just fail out and log a note to the syslog -- the rest of what we were doing will continue on unhindered, so you can still delete, favorite, etc and it just won't sync the info over in that case.
Brion Vibber [Fri, 19 Nov 2010 22:00:22 +0000 (14:00 -0800)]
Ticket #1987: support since_id on API notice search methods.
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)
Brion Vibber [Fri, 19 Nov 2010 20:39:07 +0000 (12:39 -0800)]
Ticket #2441: fix deletion of avatars when a profile is deleted.
Code was doing a batch call to $avatar->delete() which fails to properly engage the file deletion code. Calling the existing profile->delete_avatars() function deletes them individually, which makes it all work nice again.
Brion Vibber [Fri, 19 Nov 2010 19:56:03 +0000 (11:56 -0800)]
Ticket #2899: clean up inbox/outbox DM form a bit:
- "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.
Brion Vibber [Thu, 18 Nov 2010 22:40:05 +0000 (14:40 -0800)]
scripts/deletegroup.php -- basic CLI script to delete a group by id or local nickname. Like deleteuser.php, this can be used in batch runs by providing the -y override.
Brion Vibber [Wed, 17 Nov 2010 22:24:35 +0000 (14:24 -0800)]
Partial fix for tickets #2194, #2393: Workaround for Meteor breaking AJAX error responses returned on posting new notices. Fixes things in Firefox 4, but Safari 5 and Chrome 8 still don't return data... either on success or failure! Sigh.
The Meteor realtime plugin sets document.domain to the common prefix between the main server and the Meteor server's hostnames, which overrides the same-origin controls on JavaScript DOM access so the two parts of the app can speak to each other.
This unfortunately causes "fun" side effects for XMLHTTPRequest access to the main domain... if the new domain doesn't match the actual host (eg 'status.net' instead of 'brion.status.net') then we can't access the XHR's responseXML attribute, which holds a DOM tree of the parsed XML return data.
As a workaround, if we can't get at the contents there, we'll parse a fresh DOM tree in the local context from the responseText property, which remains available.
In the longer term, recommend retooling the realtime stuff so it's not fiddling with document.domain. It could also be an issue as it could allow local JavaScript XSS attacks to migrate to subdomains in other open windows.
Brion Vibber [Wed, 17 Nov 2010 21:03:59 +0000 (13:03 -0800)]
Add $config['attachments']['process_links'] to allow disabling processing of 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.
Brion Vibber [Mon, 15 Nov 2010 23:34:12 +0000 (15:34 -0800)]
Stub RemoteprofileAction to show the standard profile header stuff for offsite users -- provides a way to get at the mod & block controls for remote users.
Brion Vibber [Mon, 15 Nov 2010 23:32:57 +0000 (15:32 -0800)]
some User -> Profile cleanup to help in adapting the profile page action to show stuff for remote users. Subscriptions, groups, roles, etc are all on profiles now so go ahead and use em.
Brion Vibber [Mon, 15 Nov 2010 20:35:15 +0000 (12:35 -0800)]
Drop PEAR Services_oEmbed -- ended up replaced by our oEmbedHelper wrapper. The extra validation available there is problematic, and their code for building HTML for us wasn't being used anyway.