Commit Graph

761 Commits

Author SHA1 Message Date
Evan Prodromou 14adb7cc41 Give users more control over URL shortening
Users and administrators can set how long an URL can be before it's
shortened, and how long a notice can be before all its URLs are
shortened. They can also turn off shortening altogether.

Squashed commit of the following:

commit d136b39011
Author: Evan Prodromou <evan@status.net>
Date:   Mon Apr 26 02:39:00 2010 -0400

    use site and user settings to determine when to shorten URLs

commit 1e1c851ff3
Author: Evan Prodromou <evan@status.net>
Date:   Mon Apr 26 02:38:40 2010 -0400

    add a method to force shortening URLs

commit 4d29ca0b91
Author: Evan Prodromou <evan@status.net>
Date:   Mon Apr 26 02:37:41 2010 -0400

    static method for getting best URL shortening service

commit a9c6a3bace
Author: Evan Prodromou <evan@status.net>
Date:   Mon Apr 26 02:37:11 2010 -0400

    allow 0 in numeric entries in othersettings

commit 767ff2f7ec
Author: Evan Prodromou <evan@status.net>
Date:   Mon Apr 26 02:36:46 2010 -0400

    allow 0 or blank string in inputs

commit 1e21af42a6
Author: Evan Prodromou <evan@status.net>
Date:   Mon Apr 26 02:01:11 2010 -0400

    add more URL-shortening options to othersettings

commit 869a6be0f5
Author: Evan Prodromou <evan@status.net>
Date:   Sat Apr 24 14:22:51 2010 -0400

    move url shortener superclass to lib from plugin

commit 9c0c9863d5
Author: Evan Prodromou <evan@status.net>
Date:   Sat Apr 24 14:20:28 2010 -0400

    documentation and whitespace on UrlShortenerPlugin

commit 7a1dd5798f
Author: Evan Prodromou <evan@status.net>
Date:   Sat Apr 24 14:05:46 2010 -0400

    add defaults for URL shortening

commit d259c37ad2
Author: Evan Prodromou <evan@status.net>
Date:   Sat Apr 24 13:40:10 2010 -0400

    Add User_urlshortener_prefs

    Add a table for URL shortener prefs, a corresponding class, and the
    correct mumbo-jumbo in statusnet.ini to make everything work.
2010-04-26 02:40:36 -04:00
Brion Vibber 2f4438fe24 Merge branch '0.9.x' into 1.0.x
Conflicts:
	actions/imsettings.php
	lib/jabber.php

Made a quick attempt to merge the new JID validation into the XmppPlugin, have not had a chance to test that version live yet.
Should also move over the test cases.
2010-04-02 15:56:25 -07:00
Brion Vibber df9eb4164a Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x 2010-03-31 12:48:24 -07:00
Brion Vibber 0841fa712e Ticket #1281: JID validation now more or less follows spec instead of calling e-mail validator
Basic splitting/validation code submitted via http://status.net/wiki/XMPP/JID_validation -- Copyright 2009 Patrick Georgi <patrick@georgi-clan.de> Licensed under ISC-L, which is compatible with everything else that keeps the copyright notice intact.

Added PEAR Net_IDNA package to extlib to handle IDN normalization (also used by Validate's email verifier if present).

* added test suite, supplemented my own test cases with JID validation and normalization test cases from libpurple
* follows XMPP rules for validation of name part
* fixes for normalization with non-ASCII names
* will do domain checks if $config['email']['check_domain'] is on, checking for an XMPP-server SRV record or any lookup. (We don't actually need to ping those direct though.)
* some more obscure stringprep validation rules aren't quite followed yet, but we err on the side of permissiveness.
* we still don't actually let you save your address with a resource on it, as we strip resources when looking up users who've sent us presence or message updates. I would recommend saving the outgoing resource as a separate field if/when we add that..?
2010-03-30 17:35:27 -07:00
Brion Vibber 01a03e34c8 Merge branch '0.9.x' into 1.0.x 2010-03-29 15:15:51 -07:00
Craig Andrews 1bf27de9b9 if there is oembed data for a file/link, consider that link to have an attachment 2010-03-26 18:13:45 -04:00
Brion Vibber c3ceaa893f Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 1.0.x 2010-03-24 14:11:01 -07:00
Brion Vibber 7277b59734 Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing 2010-03-23 12:13:32 -07:00
Brion Vibber 80b16c8499 Don't add PHPSESSID parameter onto notice and conversation URIs if we save a notice during a session override.
This was being triggered by welcomebot messages created at account creation time, then propagated through replies.
2010-03-23 09:56:05 -07:00
Brion Vibber 2d79455a1f Don't add PHPSESSID parameter onto notice and conversation URIs if we save a notice during a session override.
This was being triggered by welcomebot messages created at account creation time, then propagated through replies.
2010-03-23 09:54:24 -07:00
Brion Vibber e89908f261 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 1.0.x
Conflicts:
	lib/channel.php
	scripts/imdaemon.php
2010-03-22 13:56:16 -07:00
Brion Vibber ddb656fcd2 Merge branch 'testing' into 0.9.x
Conflicts:
	actions/apistatusnetconfig.php
2010-03-10 09:55:14 -08:00
Zach Copley 7f2253759c A blank username should never be allowed. 2010-03-10 03:39:05 +00:00
Brion Vibber 60e0f04261 Ticket #2210: adjust locale setup fallback to try more locales on the system if en_US isn't available. We just need *something* other than C or POSIX to let gettext initialize itself, apparently...
Gets Spanish, French, Russian etc UI localization working on Debian Lenny fresh installation set up in Spanish (so es_ES.UTF-8 is available but en_US.UTF-8 isn't).
2010-03-09 17:38:16 +01:00
Craig Andrews 689e2e112b make common_copy_args() work when the post/get request includes arrays (form elements with names ending in [] having multiple values) 2010-03-08 21:43:34 -05:00
Craig Andrews 714d920fae Merge branch '0.9.x' into 1.0.x
Conflicts:
	classes/statusnet.ini
	db/statusnet.sql
	lib/jabber.php
	lib/xmppmanager.php
2010-03-08 17:22:23 -05:00
Brion Vibber 0881eba80e Language setting fixes:
- switch 'en_US' to 'en', fixes the "admin panel switches to Arabic" bug
- tweak setting descriptions to clarify that most of the time we'll be using browser language
- add a backend switch to disable language detection (should this be exposed to ui?)
2010-03-03 12:10:43 -08:00
Brion Vibber 3bb42d1170 Use poster's subscribed groups to disambiguate group linking when a remote group and a local group exist with the same name. (If you're a member of two groups with the same name though, there's not a defined winner.) 2010-03-03 19:00:02 +00:00
Craig Andrews c30f95c55c Updated some references to the long gnone "isEnclosure" function to the new "getEnclosure" 2010-03-02 14:25:06 -08:00
Brion Vibber 72460091dd Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing 2010-03-02 12:21:48 -08:00
Brion Vibber f596e072e7 Fix for regression in updated mention checks, sometimes lost links to folks mentioned in the replied message. 2010-03-02 09:53:00 -08:00
Zach Copley a5dc5f9c62 Upgrade XML output scrubbing to better deal with newline and a few other chars 2010-03-01 14:58:06 -08:00
Evan Prodromou 4d9daf2149 Use notice for context when deciding who @nickname refers to
In a federated system, "@nickname" is insufficient to uniquely
identify a user. However, it's a very convenient idiom. We need to
guess from context who 'nickname' refers to.

Previously, we were using the sender's profile (or what we knew about
them) as the only context. So, we assumed that they'd be mentioning to
someone they followed, or someone who followed them, or someone on
their own server.

Now, we include the notice information for context. We check to see if
the notice is a reply to another notice, and if the author of the
original notice has the nickname 'nickname', then the mention is
probably for them. Alternately, if the original notice mentions someone
with nickname 'nickname', then this notice is probably referring to
_them_.

Doing this kind of context sleuthing means we have to render the
content very late in the notice-saving process.
2010-02-27 16:06:46 -05:00
Evan Prodromou 4b696cf51f add a flag to impede adding sessions to URLs (for permanent stuff) 2010-02-26 17:28:44 -05:00
Brion Vibber 593885f98c Tweak common_url_to_nickname to take the last path component; fixes pulling nicks from Google profile pages (path is "/profile/<nickname>") 2010-02-25 23:52:34 +00:00
Brion Vibber b7037a49af Merge branch 'master' of gitorious.org:statusnet/mainline into testing 2010-02-25 11:57:21 -08:00
Brion Vibber a8d0c8d8ef Normalize nickname case on login; fixes failed logins where people were typing MixedCase nicknames (if browser saved this form, it would never work again until clearing the saved form data; very icky.) 2010-02-25 11:56:48 -08:00
Brion Vibber 39a8e9d8e6 Ensure that shortened URLs haven't accumulated whitespace when fetched by a plugin. Some shorteners have ended up inserting extra newlines when the string gets extracted from tidied HTML. 2010-02-25 10:30:37 -08:00
Craig Andrews c187bf5597 Merge branch '0.9.x' into 1.0.x
Conflicts:
	EVENTS.txt
	db/statusnet.sql
	lib/queuemanager.php
2010-02-24 20:52:45 -05:00
Brion Vibber 59be4b8cae Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x 2010-02-24 15:47:51 -08:00
Brion Vibber c36bdc1ba5 - break OMB profile update pings to a background queue
- add event hooks to profile update pings
- send Salmon pings with custom update-profile event to OStatus subscribees and groups (subscribers will see it on your next post)
- fix OStatus queues with overlong transport names, should work on DB queues now
- Ostatus_profile::notifyActivity() and ::notifyDeferred() now can take XML, Notice, or Activity for convenience
2010-02-24 20:36:36 +00:00
Evan Prodromou ab3db8c899 Combine code that finds mentions into one place and add hook points
Combined the code that finds mentions of other profiles into one place.

common_find_mentions() finds mentions and calls hooks to allow
supplemental syntax for mentions (like OStatus).

common_linkify_mentions() links mentions.

common_linkify_mention() links a mention.

Notice::saveReplies() now uses common_find_mentions() instead of
trying to parse everything again.
2010-02-21 16:20:30 -05:00
Craig Andrews 20d6a7caed Merge branch '0.9.x' into 1.0.x
Conflicts:
	lib/queuemanager.php
	lib/xmppmanager.php
	plugins/Xmpp/Fake_XMPP.php
	scripts/imdaemon.php
2010-02-16 13:15:09 -05:00
Brion Vibber d5cbfe8071 Merge branch 'testing' into 0.9.x
Conflicts:
	lib/iomaster.php
2010-02-16 09:25:09 -08:00
Evan Prodromou a8c2a8261e move some nickname-guessing code to lib/util.php from OpenID 2010-02-16 11:06:10 -05:00
Craig Andrews 32084e33a2 Merge branch '0.9.x' into 1.0.x
Conflicts:
	lib/queuemanager.php
2010-02-16 10:25:57 -05:00
Brion Vibber f8a459a88a Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x 2010-02-12 15:32:12 -08:00
Brion Vibber 38f42d56bc Session fix for PHP 5.3 configurations where cookies are excluded from $_REQUEST via request_order in php.ini (Fedora 12, MacPorts known to be affected) 2010-02-12 15:24:15 -08:00
Brion Vibber 122c8677b7 Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x 2010-02-12 11:18:35 -08:00
Brion Vibber 8449256817 OStatus partial support for group subscriptions:
* detection of group feeds is currently a nasty hack based on presence of '/groups/' in URL -- should use some property on the feed?
* listing for the remote group is kinda cruddy; needs to be named more cleanly
* still need to establish per-author profiles (easier once we have the updated Atom code in)
* group delivery probably not right yet
* saving of group messages still triggering some weird behavior

Added support for since_id and max_id on group timeline feeds as a free extra. Enjoy!
2010-02-09 18:32:52 -08:00
Brion Vibber b2e8d8407c Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x 2010-02-08 15:48:52 -08:00
Brion Vibber 384387c9b0 OStatus cleanup...
* Treat linkless feed posts as status updates; drop the "New post:" prefix and quotes on them.
* Use stable user IDs for atom/rss2 feed links instead of unstable nicknames
* Pull Atom feed preferentially when subscribing -- can now put the remote user's profile page straight into the feed subscription form and get to the right place.
* Clean up naming for push endpoints
2010-02-08 14:58:12 -08:00
Craig Andrews 057ec1fcea Merge branch '0.9.x' into 1.0.x
Conflicts:
	EVENTS.txt
	lib/imqueuehandler.php
	lib/jabber.php
	lib/util.php
	plugins/Xmpp/Sharing_XMPP.php
2010-02-02 17:00:10 -05:00
Brion Vibber c14ac57b19 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x 2010-02-01 10:30:45 -08:00
Brion Vibber fba4153346 Don't enqueue into plugin or SMS queues when disabled (breaks unqueuehandler if SMS queue isn't attached) 2010-02-01 10:16:19 -08:00
Evan Prodromou 779204b194 Merge branch 'testing' into 0.9.x
Conflicts:
	actions/apioauthauthorize.php
2010-01-31 15:27:58 -05:00
Brion Vibber 78fe76b058 dropping the setcookie() call from common_ensure_session() since we're pretty sure it's unnecessary 2010-01-27 23:16:06 -08:00
Brion Vibber 65c4cff01c append '/' on cookie path for now (may still need some refactoring) 2010-01-27 23:14:49 -08:00
Evan Prodromou 1ba8045a9b set session cookie correctly 2010-01-28 01:24:00 -05:00
Craig Andrews e9995b0f6a Create IM plugin, Pluginize XMPP, Create AIM plugin 2010-01-27 13:48:35 -05:00