summaryrefslogtreecommitdiff
path: root/lib/util.php
AgeCommit message (Collapse)Author
2010-04-30Merge branch '0.9.x' into 1.0.xBrion Vibber
Conflicts: lib/util.php
2010-04-26Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.xEvan Prodromou
2010-04-26Give users more control over URL shorteningEvan Prodromou
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 d136b390115829c4391b3666bb1967f190a0de35 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 1e1c851ff3cb2da5e0dc3a0b06239a9d9c618488 Author: Evan Prodromou <evan@status.net> Date: Mon Apr 26 02:38:40 2010 -0400 add a method to force shortening URLs commit 4d29ca0b91201f6df42940297ed5b64b070efe49 Author: Evan Prodromou <evan@status.net> Date: Mon Apr 26 02:37:41 2010 -0400 static method for getting best URL shortening service commit a9c6a3bace0af44bcf38d1c790425a7be9c72147 Author: Evan Prodromou <evan@status.net> Date: Mon Apr 26 02:37:11 2010 -0400 allow 0 in numeric entries in othersettings commit 767ff2f7ecfd7e76e8418fc79d45e61898f09382 Author: Evan Prodromou <evan@status.net> Date: Mon Apr 26 02:36:46 2010 -0400 allow 0 or blank string in inputs commit 1e21af42a685f600f4a53f49a194013e78b12f20 Author: Evan Prodromou <evan@status.net> Date: Mon Apr 26 02:01:11 2010 -0400 add more URL-shortening options to othersettings commit 869a6be0f5779aff69018d02f9ac0273946040d9 Author: Evan Prodromou <evan@status.net> Date: Sat Apr 24 14:22:51 2010 -0400 move url shortener superclass to lib from plugin commit 9c0c9863d532942b99184f14e923fc3c050f8177 Author: Evan Prodromou <evan@status.net> Date: Sat Apr 24 14:20:28 2010 -0400 documentation and whitespace on UrlShortenerPlugin commit 7a1dd5798f0fcf2c03d1257a18ddcb9008879de0 Author: Evan Prodromou <evan@status.net> Date: Sat Apr 24 14:05:46 2010 -0400 add defaults for URL shortening commit d259c37ad231ca0010c60e5cfd397bb1732874a4 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-21add 'always' parameter to common_shorten_linksCraig Andrews
2010-04-20Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.xBrion Vibber
2010-04-20Merge branch 'master' of gitorious.org:statusnet/mainline into testingBrion Vibber
2010-04-20Fix email notifications for @-replies that come via OStatus.Brion Vibber
* Moved notification sending from Notice::saveReplies to distrib queue handler, so it'll pull from the reply set we've saved regardless of how we got it. * Set up gettext infrastructure for command-line scripts; gets localization mail notifications etc working from background queues. * Adjusted locale switching: common_switch_locale() works at runtime for bg scripts, forces a message catalog update
2010-04-18Merge branch '0.9.x' into 1.0.xCraig Andrews
Conflicts: actions/confirmaddress.php actions/imsettings.php
2010-04-11Add translator documentation and FIXMEs that plural support should be added ↵Siebrand Mazeland
for some messages.
2010-04-09Merge branch 'testing' into 0.9.xBrion Vibber
2010-04-08Maintain 'page' parameter for block from subscribers list, block & ↵Brion Vibber
make-admin from group members list. Refactored some of the returnto handling code. It looks like we have several different ways of handling this in the software, icky! Marked the session-based functions with fixmes (they'll stomp on other forms when multiple tabs/windows are used) and combined some commonish bits of code between ProfileFormAction and the group block & makeadmin actions where they're using hidden form parameters. Extended that to allow passing dynamic parameters (eg 'page') as well as static ones (action, target user/group).
2010-04-08In single-user mode, link #hashtags to the user's tagged stream rather than ↵Brion Vibber
the global tag action, which isn't registered. Previously they would end up pointing to the home URL.
2010-04-08Revert "scripts/strip_geo.php to remove geodata from notices by a given ↵Brion Vibber
user/profile." This reverts commit ab20e75ff8feab01b4fec81c02b8b4039d65cca0. Accidentally removed another commit; clearing up...
2010-04-08scripts/strip_geo.php to remove geodata from notices by a given user/profile.Brion Vibber
May be slow or run out of memory if run on particularly prolific posters -- not yet optimized for that case. Note that geodata that has already been sent out to other services (via ostatus, omb, twitter, etc) will not be removed from them.
2010-04-08In single-user mode, link #hashtags to the user's tagged stream rather than ↵Brion Vibber
the global tag action, which isn't registered. Previously they would end up pointing to the home URL.
2010-04-02Merge branch '0.9.x' into 1.0.xBrion Vibber
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-03-31Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.xBrion Vibber
2010-03-30Ticket #1281: JID validation now more or less follows spec instead of ↵Brion Vibber
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-29Merge branch '0.9.x' into 1.0.xBrion Vibber
2010-03-26if there is oembed data for a file/link, consider that link to have an ↵Craig Andrews
attachment
2010-03-24Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 1.0.xBrion Vibber
2010-03-23Merge branch 'master' of git@gitorious.org:statusnet/mainline into testingBrion Vibber
2010-03-23Don't add PHPSESSID parameter onto notice and conversation URIs if we save a ↵Brion Vibber
notice during a session override. This was being triggered by welcomebot messages created at account creation time, then propagated through replies.
2010-03-23Don't add PHPSESSID parameter onto notice and conversation URIs if we save a ↵Brion Vibber
notice during a session override. This was being triggered by welcomebot messages created at account creation time, then propagated through replies.
2010-03-22Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 1.0.xBrion Vibber
Conflicts: lib/channel.php scripts/imdaemon.php
2010-03-10Merge branch 'testing' into 0.9.xBrion Vibber
Conflicts: actions/apistatusnetconfig.php
2010-03-10A blank username should never be allowed.Zach Copley
2010-03-09Ticket #2210: adjust locale setup fallback to try more locales on the system ↵Brion Vibber
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-08make common_copy_args() work when the post/get request includes arrays (form ↵Craig Andrews
elements with names ending in [] having multiple values)
2010-03-08Merge branch '0.9.x' into 1.0.xCraig Andrews
Conflicts: classes/statusnet.ini db/statusnet.sql lib/jabber.php lib/xmppmanager.php
2010-03-03Language setting fixes:Brion Vibber
- 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-03Use poster's subscribed groups to disambiguate group linking when a remote ↵Brion Vibber
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-02Updated some references to the long gnone "isEnclosure" function to the new ↵Craig Andrews
"getEnclosure"
2010-03-02Merge branch 'master' of git@gitorious.org:statusnet/mainline into testingBrion Vibber
2010-03-02Fix for regression in updated mention checks, sometimes lost links to folks ↵Brion Vibber
mentioned in the replied message.
2010-03-01Upgrade XML output scrubbing to better deal with newline and a few other charsZach Copley
2010-02-27Use notice for context when deciding who @nickname refers toEvan Prodromou
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-26add a flag to impede adding sessions to URLs (for permanent stuff)Evan Prodromou
2010-02-25Tweak common_url_to_nickname to take the last path component; fixes pulling ↵Brion Vibber
nicks from Google profile pages (path is "/profile/<nickname>")
2010-02-25Merge branch 'master' of gitorious.org:statusnet/mainline into testingBrion Vibber
2010-02-25Normalize nickname case on login; fixes failed logins where people were ↵Brion Vibber
typing MixedCase nicknames (if browser saved this form, it would never work again until clearing the saved form data; very icky.)
2010-02-25Ensure that shortened URLs haven't accumulated whitespace when fetched by a ↵Brion Vibber
plugin. Some shorteners have ended up inserting extra newlines when the string gets extracted from tidied HTML.
2010-02-24Merge branch '0.9.x' into 1.0.xCraig Andrews
Conflicts: EVENTS.txt db/statusnet.sql lib/queuemanager.php
2010-02-24Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.xBrion Vibber
2010-02-24- break OMB profile update pings to a background queueBrion Vibber
- 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-21Combine code that finds mentions into one place and add hook pointsEvan Prodromou
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-16Merge branch '0.9.x' into 1.0.xCraig Andrews
Conflicts: lib/queuemanager.php lib/xmppmanager.php plugins/Xmpp/Fake_XMPP.php scripts/imdaemon.php
2010-02-16Merge branch 'testing' into 0.9.xBrion Vibber
Conflicts: lib/iomaster.php
2010-02-16move some nickname-guessing code to lib/util.php from OpenIDEvan Prodromou
2010-02-16Merge branch '0.9.x' into 1.0.xCraig Andrews
Conflicts: lib/queuemanager.php