Commit Graph

972 Commits

Author SHA1 Message Date
Evan Prodromou 9c286feb5f fix bad function name 2012-04-24 13:17:54 -04:00
Evan Prodromou 64b03439b5 Check for HTTP_HOST before fetching it 2012-04-24 12:55:09 -04:00
Evan Prodromou 540c545399 Don't replace URLs if 'shortened' version is longer, unless forced 2011-09-26 17:05:35 -04:00
Evan Prodromou 12588b1cf7 Merge commit 'refs/merge-requests/166' of git://gitorious.org/statusnet/mainline into merge-requests/166 2011-09-21 15:24:17 -04:00
Evan Prodromou 11f2a3d551 Merge branch '1.0.x' into nummedout 2011-09-14 12:20:37 -04:00
Evan Prodromou 15ae1cddfe two useful functions for profiling 2011-09-14 12:19:29 -04:00
Evan Prodromou 40924842f4 new URLMapper without Net_URL_Mapper 2011-09-14 12:15:56 -04:00
Antonin Kral ab4f4dbab4 add Connection: close when sending redirect 2011-09-08 11:45:34 +02:00
Evan Prodromou 0022bb8110 fix calls to staticGet() to avoid problems with default args 2011-08-22 18:06:06 -04:00
Evan Prodromou 513c54fa89 Merge branch 'master' into 1.0.x
Conflicts:
	lib/common.php
2011-08-02 15:04:14 -04:00
Evan Prodromou edb3f704b9 correctly include UTF-8 alphanum chars in tags 2011-08-02 14:03:12 -04:00
Evan Prodromou 10ce44c297 cleanse tags of non-tag characters when canonicalizing 2011-08-02 13:49:00 -04:00
Zach Copley b925eeecde Fix errors thrown by code trying to broadcast profiles via OMB when the OMB plugin isn't installed 2011-08-02 01:15:30 -07:00
Zach Copley 6f0bd73e6c Squashed commit of the following:
Move OMB to a plugin

commit 75d21f00246bcc56d7f854936be1e28395e079a2
Merge: cea0199 d594d07
Author: Zach Copley <zach@status.net>
Date:   Fri Jul 15 11:16:54 2011 -0700

    Merge branch 'kill-omb2' of gitorious.org:~zcopley/statusnet/zcopleys-clone into kill-omb2

    * 'kill-omb2' of gitorious.org:~zcopley/statusnet/zcopleys-clone:
      Fix paths
      Oops, I left out the ability to authorize a token in ApiStatusNetOAuthDataStore
      Some odds and ends
      Remove omb stuff from queuemanager defaults
      Add check to make sure we're not untagging an OMB profile to OMB plugin
      Move some more subscription stuff and peopletag checks to OMB plugin
      Move some OMB-specific unsubscribe stuff to OMB plugin
      Finish removing libomb from core extlibs
      Fix more conflicts
      Fix queuing/queuehandling
      Move some stuff around; fix references
      Fix conflicts
      Move OMB-specific files to OMB plugin
      Move some stuff around; fix references
      Add OMB plugin README and rm references to OMB in mail StatusNet README
      Update paths
      Fix define
      Basic plugin finished
      Move OMB-specific files to OMB plugin
      Remove OMB stuff from router

commit cea019967f343042ebaea14b7bbb0d54289bcc1a
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 13 14:38:40 2011 -0700

    Fix paths

commit d412aa3c0ea0e21e65a72a16c7b9edd64ff373e1
Author: Zach Copley <zach@status.net>
Date:   Tue Jul 12 18:17:06 2011 -0700

    Oops, I left out the ability to authorize a token in ApiStatusNetOAuthDataStore

commit b459c9f10ac283d6e774ef13f3293fc8a6948143
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 6 19:02:08 2011 -0700

    Some odds and ends

commit 895cfbfce58ffb3a05beebf48a90c549e00f1cce
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 6 19:01:23 2011 -0700

    Remove omb stuff from queuemanager defaults

commit b41b9e994f291ff83afb2460d9b37aee8ec1ec2b
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 6 18:46:44 2011 -0700

    Add check to make sure we're not untagging an OMB profile to OMB plugin

commit 94374d26ddd428dac8e4cd4541fd56db748c248b
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 6 18:34:20 2011 -0700

    Move some more subscription stuff and peopletag checks to OMB plugin

commit b91043b7820d5cd8b0ba4e9ee2a9d03c99248f11
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 6 16:37:25 2011 -0700

    Move some OMB-specific unsubscribe stuff to OMB plugin

commit d9430fe52975d9497b4a0d3d54da35b222e207ad
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 6 15:26:30 2011 -0700

    Finish removing libomb from core extlibs

commit bb6257eb85cc7ba392e91468c01503f51faeb989
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 13 12:47:32 2011 -0700

    Fix more conflicts

commit 3c760d0a4b4a083ae5fca2530d22aad5f4a9fdae
Author: Zach Copley <zach@status.net>
Date:   Tue Jul 5 15:49:22 2011 -0700

    Fix queuing/queuehandling

commit ed635fa0c20e150673709c04ecc7f285d12e0ce2
Author: Zach Copley <zach@status.net>
Date:   Tue Jul 5 15:29:35 2011 -0700

    Move some stuff around; fix references

commit cbc553a147941cad16e205a6b66ab4b32a5e3d3d
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 13 12:46:05 2011 -0700

    Fix conflicts

commit 5d77c81f75b57f5d5357d6b46d503650a4b3225d
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 30 19:10:38 2011 -0700

    Move OMB-specific files to OMB plugin

commit 2ed051dbce0ce9b44723b14922026849c39ed603
Author: Zach Copley <zach@status.net>
Date:   Tue Jul 5 15:29:35 2011 -0700

    Move some stuff around; fix references

commit 8809b5e35b1aacb67d70ae3e55a43003b6f591b7
Author: Zach Copley <zach@status.net>
Date:   Tue Jul 5 15:28:59 2011 -0700

    Add OMB plugin README and rm references to OMB in mail StatusNet README

commit 35ced4067c1915baca0b3e184f9533a91a951d2d
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 30 23:50:09 2011 -0700

    Update paths

commit 0ee5bafbce95fc9b8db98c1e828d33d26d08bc73
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 30 23:38:03 2011 -0700

    Fix define

commit e309dd22ffb9087d7fcf9180ede4f531dbd88c3c
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 30 23:30:43 2011 -0700

    Basic plugin finished

commit 00f1e930f27e080b04d1e82952f7886c84e01d97
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 30 19:10:38 2011 -0700

    Move OMB-specific files to OMB plugin

commit 39dcd031a79b49da0b4fe25f1594d2e406b5eb65
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 30 19:10:01 2011 -0700

    Remove OMB stuff from router

commit d594d071be1ec42518dd5465db61e01e7e8ec036
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 13 14:38:40 2011 -0700

    Fix paths

commit 48c1064b4b50e89cf51d2cab388f708f60601247
Author: Zach Copley <zach@status.net>
Date:   Tue Jul 12 18:17:06 2011 -0700

    Oops, I left out the ability to authorize a token in ApiStatusNetOAuthDataStore

commit 1e1168978f38c31dbf0206b3493b2b6dcbe61589
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 6 19:02:08 2011 -0700

    Some odds and ends

commit ac43af2b497d8b9286c49a9469a1dff950e41650
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 6 19:01:23 2011 -0700

    Remove omb stuff from queuemanager defaults

commit 2471af2f8800515a3db544b3a186a18f3e8a43af
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 6 18:46:44 2011 -0700

    Add check to make sure we're not untagging an OMB profile to OMB plugin

commit df974646459ac6d5d97a40d008f1aab66f998226
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 6 18:34:20 2011 -0700

    Move some more subscription stuff and peopletag checks to OMB plugin

commit 8a1427b759e791c14a7a7a22128ba05f0b4b6d12
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 6 16:37:25 2011 -0700

    Move some OMB-specific unsubscribe stuff to OMB plugin

commit bd24220dbb5170af22ea0dea8a3062e6d1aeb6a2
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 6 15:26:30 2011 -0700

    Finish removing libomb from core extlibs

commit 4c3c6f1fabb0f2c92635ccc5e8f38db2293f5456
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 13 12:47:32 2011 -0700

    Fix more conflicts

commit db44deefd731a412685c5669c4c6fa69833de922
Author: Zach Copley <zach@status.net>
Date:   Tue Jul 5 15:49:22 2011 -0700

    Fix queuing/queuehandling

commit ea2d84d2f3d518950d3aa1956ddc8f3a25ca55f3
Author: Zach Copley <zach@status.net>
Date:   Tue Jul 5 15:29:35 2011 -0700

    Move some stuff around; fix references

commit 8ac3e010444b41bd9a78766f5e37e49dff023b45
Author: Zach Copley <zach@status.net>
Date:   Wed Jul 13 12:46:05 2011 -0700

    Fix conflicts

commit 0aad6e10e3637b3189a87b42c24c1d6de1b346bc
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 30 19:10:38 2011 -0700

    Move OMB-specific files to OMB plugin

commit d982d7076c5cb28c7b8e4b1dde8d07d7e58e278f
Author: Zach Copley <zach@status.net>
Date:   Tue Jul 5 15:29:35 2011 -0700

    Move some stuff around; fix references

commit 4b9d39c93562ff4c45c37c940013e8b78197dec1
Author: Zach Copley <zach@status.net>
Date:   Tue Jul 5 15:28:59 2011 -0700

    Add OMB plugin README and rm references to OMB in mail StatusNet README

commit dab0fb6647a85e6835298496d7127a398b6b9293
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 30 23:50:09 2011 -0700

    Update paths

commit 2cb73dac8ad971f1545dcf6ba57746c777e232ef
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 30 23:38:03 2011 -0700

    Fix define

commit 6f226b18a059f175b1bdd3abcb8cb95eedc22ee7
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 30 23:30:43 2011 -0700

    Basic plugin finished

commit 7be304beaa0f39755c3978e0b852fde768950da4
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 30 19:10:38 2011 -0700

    Move OMB-specific files to OMB plugin

commit 5b30da01cfa2802d6e7a4a4a4f39b8043c54f472
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 30 19:10:01 2011 -0700

    Remove OMB stuff from router
2011-07-15 12:13:57 -07:00
Evan Prodromou 13d479bc18 stop sending OMB by default 2011-06-27 13:02:32 -04:00
Evan Prodromou 90eb09624c let users login with email address 2011-05-02 15:17:08 -07:00
Evan Prodromou d09df28040 utility functions for setting config options in memory 2011-04-26 16:50:42 -04:00
Evan Prodromou 28d0d9caad loop through args in common_markup_to_html 2011-04-18 09:51:26 -04:00
Evan Prodromou b72788d9ce pass args from Docfile to renderer 2011-04-18 09:47:08 -04:00
Evan Prodromou 99d538af58 docfiles can take arguments 2011-04-18 09:03:43 -04:00
Evan Prodromou e53edc2b6b allow user properties in documentation files 2011-04-18 06:17:28 -04:00
Zach Copley 0f9d6f4c82 DirectoryPlugin - Hijack router mapping for normal groups page to substitute a directory page 2011-04-13 15:09:45 -07:00
Zach Copley e75c9988eb Merge branch 'people_tags_rebase' into 1.0.x
Conflicts:
	EVENTS.txt
2011-04-10 08:10:01 +00:00
Evan Prodromou c382a1d8cc fix errant class in notice content 2011-04-09 17:05:59 -04:00
Evan Prodromou ec1579474c add classes to profile and group links in notices 2011-04-09 15:42:27 -04:00
Shashi Gowda 5a2bab07b2 Merge remote-tracking branch 'mainline/1.0.x' into people_tags_rebase
Conflicts:
	actions/tagother.php
	classes/Profile.php
	classes/Profile_tag.php
	js/util.min.js
2011-03-30 15:47:42 +05:30
Evan Prodromou 83fb5e6023 Mass replacement of #-comments with //-comments
like leprous boils in our code. So, I've replaced all of them with //
comments instead. It's a massive, meaningless, and potentially buggy
change -- great one for the middle of a release cycle, eh?
2011-03-22 11:54:23 -04:00
Shashi Gowda 31c1177970 Merge branch '1.0.x' into people_tags_rebase
Conflicts:
	EVENTS.txt
	actions/peopletag.php
	actions/tagother.php
	classes/Notice.php
	js/util.js
	js/util.min.js
	lib/accountprofileblock.php
	lib/action.php
	lib/activityobject.php
	lib/command.php
	lib/personalgroupnav.php
	plugins/OStatus/OStatusPlugin.php
2011-03-22 07:56:25 +05:30
Siebrand Mazeland a4e334a0ba Translator documentation added/updated.
i18n updates.
Superfluous whitespace removed.
2011-03-18 18:03:41 +01:00
Evan Prodromou c99f6f6afc remove a bunch of common_debug() calls for url shortening 2011-03-16 10:26:14 -04:00
Shashi Gowda 4b8ee81ca9 Utility functions for people tags 2011-03-06 23:33:39 +05:30
Zach Copley b7d0746694 Merge branch '0.9.x' into 1.0.x
Conflicts:
	actions/confirmaddress.php
	actions/emailsettings.php
	actions/hostmeta.php
	actions/imsettings.php
	actions/login.php
	actions/profilesettings.php
	actions/showgroup.php
	actions/smssettings.php
	actions/urlsettings.php
	actions/userauthorization.php
	actions/userdesignsettings.php
	classes/Memcached_DataObject.php
	index.php
	lib/accountsettingsaction.php
	lib/action.php
	lib/common.php
	lib/connectsettingsaction.php
	lib/designsettings.php
	lib/personalgroupnav.php
	lib/profileaction.php
	lib/userprofile.php
	plugins/ClientSideShorten/ClientSideShortenPlugin.php
	plugins/Facebook/FBConnectSettings.php
	plugins/Facebook/FacebookPlugin.php
	plugins/NewMenu/NewMenuPlugin.php
	plugins/NewMenu/newmenu.css
2011-02-28 15:39:43 -08:00
Brion Vibber 2bd9532ebe Merge branch 'master' into 0.9.x 2011-02-28 10:18:18 -08:00
Brion Vibber 6a6584741f Fix for ticket #2248: flickr etc URLs that contain @ in the paths etc no longer accidentally trip the mailto: thingy 2011-02-25 15:46:35 -08:00
Brion Vibber 0291c6f7cd Merge branch 'unicode-tag' into 0.9.x 2011-02-25 10:17:03 -08:00
Brion Vibber 295e2bde56 Unicodize a couple regexes for tags: fixes linking & detection of non-ASCII tags that match the current regexes.
(Checks for 'letter' and 'number' characters, underscore, dash, and period.)
2011-02-23 16:37:55 -08:00
Evan Prodromou 1525acdca1 Extend authorization framework to cover login and API use
I've extended the rights framework (centering on the Right class and Profile::hasRight()) to cover
Web login and API use. This will make it possible to prevent login and API use by users.

I added two new Right constants to the Right class: WEBLOGIN and API. I check these rights using
Profile::hasRight() when initializing users. If the rights check fails, I throw an exception.

I created a new AuthorizationException class for this particular
exception, in order to allow a different UI for these kinds of exceptions (or whatever).
2011-02-21 10:20:42 -05:00
Brion Vibber de7726dd00 Performance counters: records number of total and unique cache get/set/incr/deletes and queries, and logs to syslog.
$config['site']['logperf'] = true; // to record & dump total hits of each type and the runtime to syslog
$config['site']['logperf_detail'] = true; // very verbose -- dump the individual cache keys and queries as they get used (may contain private info in some queries)

Seeing 180 cache gets on a timeline page seems not unusual currently; since these run in serial, even relatively small roundtrip times can add up heavily.
We should consider ways to reduce the number of round trips, such as more frequently storing compound objects or the output of processing in memcached.
Doing parallel multi-key lookups could also help by collapsing round-trip times, but might not be easy to fit into SN's object model. (For things like streams this should actually work pretty well -- grab the list, then when it's returned go grab all the individual items in parallel and return the list)
2011-01-31 13:12:56 -08:00
Evan Prodromou 570c7b63a2 Add internal URL shortener 2011-01-23 16:49:12 -05:00
Brion Vibber 9df856e667 Merge branch '0.9.x' into merge
Conflicts:
	README
	actions/hostmeta.php
	classes/File_redirection.php
	lib/common.php
	lib/designsettings.php
	lib/router.php
	lib/util.php
	lib/xmppmanager.php
	plugins/OStatus/OStatusPlugin.php
2010-12-07 10:50:05 -08:00
Brion Vibber 2617c40e04 Merge branch 'master' of gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
	classes/User.php
2010-12-06 12:44:19 -08:00
Brion Vibber 76f3dc32e0 Added User::singleUserNickname() as (temporary?) fallback for single-user 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-06 12:39:09 -08:00
Brion Vibber aa96c3c1d9 Fix for tickets #2917, #2262: user URL shortening options not being applied 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-02 13:41:56 -08:00
Brion Vibber 3f0557aa8e General code safety: validate input and escape SQL strings in common_relative_profile() 2010-11-29 16:44:01 -08:00
Brion Vibber 82799f675f Add Nickname test cases for @-reply regexes in common_find_mentions 2010-11-29 15:07:55 -08:00
Brion Vibber dc350b5463 Work in progress on nickname validation changes. lib/nickname.php appears to have been destroyed by NetBeans and will be rewritten shortly. Sigh. 2010-11-29 14:15:25 -08:00
Brion Vibber 6c4e5a89c1 Add some doc comments on nickname-related stuff in util.php 2010-11-29 11:31:10 -08:00
Zach Copley 645a4d1754 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2010-11-17 22:16:08 +00:00
Brion Vibber 197b56778a 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.
2010-11-17 13:03:59 -08:00
Zach Copley bd566b6f85 Merge branch '0.9.x' into facebook-upgrade 2010-11-16 02:32:46 +00:00
Zach Copley 5b94d9e86b Merge branch '0.9.x' into facebook-upgrade 2010-11-09 23:16:17 +00:00
Brion Vibber 883f7a6c0b Avoid marking files as attachments that are not locally uploaded, unless they're really oembedable. HTML-y things now excluded properly. 2010-11-08 13:27:54 -08:00
Brion Vibber b716d01a41 Merge branch '0.9.x' into 1.0.x 2010-11-03 16:09:49 -07:00
Brion Vibber dc4fafbbd1 General cleanup & part of ticket #2864: use User_group->getFancyName() instead of replicating the logic in various places. Encapsulates and allows for localization of parens. 2010-11-03 12:59:19 -07:00
Zach Copley 764a297383 Output filename in log msg if one is supplied 2010-11-02 23:13:20 +00:00
Brion Vibber b26eccf33c Merge branch '0.9.x' into 1.0.x 2010-10-28 16:26:34 -07:00
Craig Andrews 22a0cf6251 Set cookies with "secure" flag on SSL sites. Improves security. 2010-10-26 17:55:09 -04:00
Brion Vibber ca489631db Merge branch '0.9.x' into 1.0.x
Conflicts:
	actions/subscriptions.php
	lib/router.php
	lib/xmppmanager.php
	lib/xmppoutqueuehandler.php
2010-10-25 13:08:57 -07:00
Zach Copley 78396db28a Forgot to add the OAuth verifier pin page to sensitive array 2010-10-25 12:36:03 -07:00
Zach Copley 0dcc3f8d71 We don't need to have editapplication (only showapplication) in the
sensitive array because it doesn't expose the consumer keypair
2010-10-25 12:10:52 -07:00
Zach Copley 3954ab39ae Add OAuth token exchange endpoint to 'sensitive' array; i.e.: use SSL if
available
2010-10-25 11:52:17 -07:00
Brion Vibber 8004e2809d Fix for ticket #2845: singleuser nickname configuration was being overridden by site owner in router setup.
I've consolidated the checks for which user to use for single-user mode into User::singleUser(), which now uses the configured nickname by preference, falling back to the site owner if it's unset.
This is now called consistently from the places that needed to use the primary user's nickname in routing setup.

Setting $config['singleuser']['nickname'] should now work again as expected.
2010-10-20 14:34:25 -07:00
Brion Vibber 7765ddae81 Merge branch '0.9.x' into 1.0.x
Conflicts:
	README
	lib/default.php
2010-10-18 12:17:11 -07:00
Evan Prodromou 7c05b0dafc options to nofollow external links in notices 2010-10-18 11:29:52 -04:00
Brion Vibber 6c959c83ce Merge branch '0.9.x' into 1.0.x 2010-10-07 13:32:26 -07:00
Brion Vibber 5e0f3e7bd4 Workaround for regression in input validation due to more PCRE oddities. Recommend redoing common_validate_utf8() using something more reliable, perhaps. :P 2010-10-07 12:32:10 -07:00
Brion Vibber 71176b9a98 Merge branch '0.9.x' into 1.0.x 2010-10-06 13:07:29 -07:00
Brion Vibber ebfa8bce27 Basic validation of UTF-8 input via GET/POST vars: invalid UTF-8 sequences will cause the string to drop. Not necessarily super-thorough; should be improved in future to drop individual bad sequences, do normalization of combining forms, etc. General input validation (for ints, types of strings, etc) still would be good to have! 2010-10-06 13:00:30 -07:00
Brion Vibber 59119482ca Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 1.0.x
Conflicts:
	actions/hostmeta.php
	actions/imsettings.php
	classes/User.php
	lib/adminpanelaction.php
	lib/channel.php
	lib/default.php
	lib/router.php
	lib/util.php
2010-10-04 12:54:36 -07:00
Brion Vibber aef42e2f65 Don't spew a notice warning to output while processing logging for PEAR DB errors 2010-09-20 16:52:22 -07:00
Brion Vibber 64cdbe6c55 Ticket #2750: fixes to HTTP caching behavior across login/logout boundaries
* now ignoring if-modified-since if we failed an etag if-none-match comparison, per spec
* now including a hash of user id/nickname in most etags, so we'll update the view properly after login/logout

For API methods, checking the API-auth'ed user. (Many change results to include things like 'you're subscribed to this user' or 'this is one of your favorites', so user info is again needed)

There'll still be some last-modified stamps that aren't including user info properly, probably.
2010-09-20 13:42:58 -07:00
Siebrand Mazeland 85154a49d0 Add plural support for minutes/hours/days/months ago.
Reapply of revised b27882c916 that was reverted by Brion Vibber in 2d4c0f9a47.
2010-09-16 00:07:47 +02:00
Brion Vibber 2d4c0f9a47 Revert "Add plural support for minutes/hours/days/months ago." -- currently doesn't work and spews error messages
This reverts commit b27882c916.
2010-09-15 14:10:18 -07:00
Siebrand Mazeland 6817420e6c Remove trailing whitespace and update comment consistency on methods. 2010-09-13 21:10:52 +02:00
Siebrand Mazeland b27882c916 Add plural support for minutes/hours/days/months ago. 2010-09-13 21:10:51 +02:00
Evan Prodromou a319b40c97 common_cache_key() -> Cache::key() 2010-09-06 10:07:43 -04:00
Evan Prodromou e42d2124a3 common_keyize() -> Cache::keyize() 2010-09-06 10:03:51 -04:00
Evan Prodromou c2de44a530 remove NOOP function common_broadcast_notice() 2010-09-06 09:59:08 -04:00
Evan Prodromou 8f81762d68 common_memcache() => Cache::instance() 2010-09-06 09:56:45 -04:00
Brion Vibber 2196d00b1b Merge branch '0.9.x' into 1.0.x
Conflicts:
	lib/command.php
2010-09-02 15:04:25 -07:00
Brion Vibber 4cbbfdab84 Fix for #2635: use ssl-sometimes settings for Twitter settings & auth pages 2010-09-02 10:55:26 -07:00
Evan Prodromou 7183175429 Merge branch 'master' into 1.0.x 2010-08-13 14:33:41 -07:00
Brion Vibber f7d599f8ea Fix for ticket 2513: "Can't linkify" error when some links are shortened
When bogus SSL sites etc were hit through a shortening redirect, sometimes link resolution kinda blew up and the user would get a "Can't linkify" error, aborting their post.
Now catching this case and just passing through the URL without attempting to resolve it. Could benefit from an overall scrubbing of the freaky link/attachment code though...! :)

http://status.net/open-source/issues/2513
2010-08-12 15:25:32 -07:00
Evan Prodromou 9f0715a993 Merge branch '0.9.x' into 1.0.x 2010-08-03 16:05:03 -07:00
Brion Vibber 974c4df029 Ticket 2433: Skip locale fallback list check on Windows ('locale -a' shell-out doesn't work there) 2010-07-12 09:56:32 -07:00
Brion Vibber b1a68e15b7 Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 1.0.x
Conflicts:
	lib/default.php
	lib/util.php
	plugins/UrlShortener/UrlShortenerPlugin.php (has been removed?)
2010-06-10 15:37:06 -07:00
Brion Vibber d88b208edc Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
	plugins/OpenID/openid.php
2010-06-07 10:19:40 -07:00
Brion Vibber 5f4c6ec626 Skip enqueueing to outgoing bridges on incoming remote messages. Twitter, Facebook, RSSCloud, and OStatus checks were enqueued on these when they'd never do anything but churn the queue servers.
Notice::isLocal() can replace a number of manual checks for $notice->is_local being LOCAL_PUBLIC or LOCAL_NONPUBLIC.
2010-06-03 16:58:45 -07:00
Brion Vibber 6eae5d6a7e Merge branch 'testing' into 0.9.x 2010-05-21 13:15:08 -07:00
Brion Vibber 708d22848e Quick fix for creating OpenID accounts authenticating against a MediaWiki site; trim the 'User:' etc from the final path segment before generating a nickname from it. Avoids ending up with nicks like 'userbrion' on your first OpenID login! 2010-05-19 16:19:06 -07:00
Brion Vibber c4203be9a4 Merge branch '0.9.x' into 1.0.x 2010-05-19 12:52:23 -07:00
Brion Vibber 7005ef6661 Merge branch 'testing' into 0.9.x
Conflicts:
	plugins/OpenID/openidlogin.php
2010-05-19 12:51:25 -07:00
Brion Vibber 74a89b1fc3 Locale switch cleanup: use common_switch_locale() which is safer for updating gettext state. Also moved a few calls to reduce chance of hitting an exception before switching back.
Should help with problems where xmppdaemon would get stuck in wrong locale.
2010-05-19 10:10:55 -07:00
Brion Vibber 91367dbc21 Merge branch '0.9.x' into 1.0.x 2010-05-14 12:15:13 -07:00
Brion Vibber 065ecc5573 Merge branch 'testing' into 0.9.x 2010-05-14 12:14:02 -07:00
Brion Vibber 3d00cfd47f Windows server fix: Use platform EOL in debug log file 2010-05-11 12:22:14 -07:00
Brion Vibber 3e8af172d6 Add ?uselang=xx language override option (only valid, locally-enabled languages supported, just as with headers and user settings).
Great aid for debugging & translation testing
2010-05-05 17:30:42 -07:00
Brion Vibber cae1329f3b Merge branch '0.9.x' into 1.0.x
Conflicts:
	lib/util.php
2010-04-30 13:16:13 -07:00
Evan Prodromou 5c05cd2b1a Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x 2010-04-26 02:43:33 -04:00
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
Craig Andrews c78a10b476 add 'always' parameter to common_shorten_links 2010-04-21 17:14:25 -04:00
Brion Vibber df41287226 Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x 2010-04-20 13:52:58 +02:00
Brion Vibber 61098faf5d Merge branch 'master' of gitorious.org:statusnet/mainline into testing 2010-04-20 13:52:18 +02:00
Brion Vibber c48caa85e1 Fix email notifications for @-replies that come via OStatus.
* 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-20 13:49:29 +02:00
Craig Andrews 39392e03a7 Merge branch '0.9.x' into 1.0.x
Conflicts:
	actions/confirmaddress.php
	actions/imsettings.php
2010-04-18 19:21:15 -04:00
Siebrand Mazeland ec0fee0f2a Add translator documentation and FIXMEs that plural support should be added for some messages. 2010-04-11 22:15:41 +02:00
Brion Vibber 1f8451f4aa Merge branch 'testing' into 0.9.x 2010-04-09 08:40:15 -07:00
Brion Vibber 5dbaaed4e6 Maintain 'page' parameter for block from subscribers list, block & 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-08 19:06:55 -07:00
Brion Vibber 6274c3977d In single-user mode, link #hashtags to the user's tagged stream rather than the global tag action, which isn't registered.
Previously they would end up pointing to the home URL.
2010-04-08 17:06:25 -07:00
Brion Vibber 0e0927985c Revert "scripts/strip_geo.php to remove geodata from notices by a given user/profile."
This reverts commit ab20e75ff8.

Accidentally removed another commit; clearing up...
2010-04-08 17:04:10 -07:00
Brion Vibber ab20e75ff8 scripts/strip_geo.php to remove geodata from notices by a given user/profile.
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-08 16:58:54 -07:00
Brion Vibber 88678eadfa In single-user mode, link #hashtags to the user's tagged stream rather than the global tag action, which isn't registered.
Previously they would end up pointing to the home URL.
2010-04-08 13:12:14 -07: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