Commit Graph

1180 Commits

Author SHA1 Message Date
Evan Prodromou
a55939f3b1 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2010-01-06 23:23:30 -08:00
Evan Prodromou
e50410683f only encache new objects when insert was successful 2010-01-06 16:34:18 -10:00
Brion Vibber
4e2acd153b ...and drop the unnecessary &reference from child class pkeyGet() overrides. 2010-01-06 14:28:40 -08:00
Brion Vibber
85554d0840 Rearrange Memcached_DataObject::staticGet() to avoid "only variables can be passed by reference" warnings when DB lookup fails and we return false.
(We need to keep it returning a reference because the extlib parent class is stuck in PHP 4-land and uses references everywhere, including this function's return value. Yuck!)

Also changed pkeyGet to drop the reference, since it doesn't have an upstream equivalent.
2010-01-06 13:35:13 -08:00
Brion Vibber
b93244395f Fix for broken profile flag admin UI: delete stray flag entries when users are deleted so broken entries don't litter the lookups.
* added ProfileDeleteRelated event to match UserDeleteRelated, to allow plugins to add extra related tables on profile deletion
* UserFlagPlugin: deleting flags when target profile is deleted
* UserFlagPlugin: deleting flags when flagging user is deleted
* UserFlagPlugin: fix for autoloader -- class names are case-insensitive. We may get lowercase class names coming in at times, such as when creating DB objects programatically from a table name.

Note that any already-existing bogus entries need to be removed from the database:
select * from user_flag_profile where (select id from profile where id=profile_id) is null;
select * from user_flag_profile where (select id from user where id=user_id) is null;
2010-01-06 11:10:33 -08:00
Evan Prodromou
35d4587172 encache on insert instead of decaching 2010-01-05 19:48:43 -10:00
Brion Vibber
8af7ba0226 Fix for overlong RT trimming: don't trim if textlimit is 0 (unlimited) 2010-01-05 16:16:25 -08:00
Brion Vibber
bbbec435b0 Fix for overlong RT trimming: don't trim if textlimit is 0 (unlimited) 2010-01-05 16:15:12 -08:00
Brion Vibber
eb22d2d240 Ticket 2135: trim overlong repeats with ellipsis rather than failing.
In web interface and retweet/repeat API we show the original untrimmed text, but some back-compat API messages will still show the trimmed 'RT' version.
This matches Twitter's behavior on overlong retweets, though we're outputting the RT version in more API results than they do.
2010-01-05 16:11:02 -08:00
Brion Vibber
9215496902 Ticket 2135: trim overlong repeats with ellipsis rather than failing.
In web interface and retweet/repeat API we show the original untrimmed text, but some back-compat API messages will still show the trimmed 'RT' version.
This matches Twitter's behavior on overlong retweets, though we're outputting the RT version in more API results than they do.
2010-01-05 16:10:00 -08:00
Brion Vibber
aff78e5121 Cache fixes:
* We now cache negative lookups; clear them in Memcached_DataObject->insert()
* Mark file.url as a unique key in statusnet.ini so its negative lookups are cleared properly (first save of a notice with a new URL was failing due to double-insert)
* Now using serialization for default in-process cache instead of just saving objects; avoids potential corruption if you save an object to cache, change the original object, then fetch the same key from cache again
2010-01-05 15:05:53 -08:00
Craig Andrews
250bcfa8dc Require users to login to view attachments on private sites
Thank you jeff-themovie for this implementation!
2010-01-05 17:49:28 -05:00
Craig Andrews
9e2e0605ed Move Authorization and Authentication plugin structures into core, instead of as plugins.
This move makes sense as you can addPlugin('Authentication') for example - these are abstract classes designed to be implemented, not used directly.
2010-01-05 13:56:22 -05:00
Evan Prodromou
4e84c523b7 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
	classes/Memcached_DataObject.php
2010-01-04 22:50:04 -10:00
Evan Prodromou
7aeb11bb07 Merge branch 'master' into 0.9.x
Conflicts:
	actions/publictagcloud.php
	classes/Memcached_DataObject.php
2010-01-04 15:14:54 -10:00
Brion Vibber
78214c4e06 Exclude process-specific link & result cache references from serialized Memcached_Data_Object instances.
Should fix seemingly-random bugs due to destructor free()ing local resources by mistake.

cherry-pick from 0.9.x
2010-01-04 14:38:56 -08:00
Brion Vibber
8f02379f6e Revert "Take Memcached_DataObject destructor back out to check whether it might be causing some under-the-hood problems."
This reverts commit 89cca01259.
2010-01-04 14:37:39 -08:00
Brion Vibber
440b9957f9 Exclude process-specific link & result cache references from serialized Memcached_Data_Object instances.
Should fix seemingly-random bugs due to destructor free()ing local resources by mistake.
2010-01-04 14:30:45 -08:00
Evan Prodromou
06b6a27d7d cached id streams can be empty, compare against false 2010-01-04 10:03:57 -10:00
Evan Prodromou
254ea279d8 carefully compare cached settings against false for Config 2010-01-04 10:02:59 -10:00
Evan Prodromou
abc9b33241 Memcached_DataObject stores empty values in the cache
There's great value in knowing that something doesn't exist. We
now cache this information, and carefully compare the results from
cache as $results !== false instead of !empty($results), since some
empty values (null, 0, empty array, empty string) are stored in the
cache.

Caching staticGet() and pkeyGet() now store DB misses in the cache,
and cachedQuery() checks for empty results from the cache.
2010-01-04 10:00:17 -10:00
Evan Prodromou
5a1ea0b9b2 Stop caching unfindable keys
There were some problems with the automated cache/uncache system
for data objects that made us cache unfindable keys (with null
attributes and sometimes null names). Fixed those problems and
refactored the encache() and decache() methods so they use a helper
to find the cache keys to use.
2010-01-04 08:59:19 -10:00
Evan Prodromou
8f362e9956 user_id is a non-autoincrement pkey for user_location_prefs 2010-01-04 08:53:28 -10:00
Evan Prodromou
d5fb88e1c0 Revert "use keys() instead of keyTypes() so plugin data object work"
This reverts commit ec380887f7.
2010-01-03 11:24:05 -10:00
Evan Prodromou
ec380887f7 use keys() instead of keyTypes() so plugin data object work 2010-01-03 10:52:24 -10:00
Evan Prodromou
90a2563a90 Merge branch 'master' into 0.9.x
Conflicts:
	classes/Memcached_DataObject.php
2010-01-02 19:47:34 -10:00
Evan Prodromou
d32fb7c7c4 return false from Memcached_DataObject::staticGet() on not found, like DB_DataObject 2010-01-02 16:28:46 -10:00
Evan Prodromou
2bd32dfad7 change harmless check of to check of in Memcached_DataObject 2010-01-02 16:21:19 -10:00
Evan Prodromou
52fbd10162 incorrectly used empty() instead of isset() for a variable that could be 0 2010-01-02 08:36:47 -10:00
Evan Prodromou
d2bbf65f19 Merge branch 'master' of git@gitorious.org:statusnet/mainline 2010-01-01 11:27:28 -10:00
Evan Prodromou
79c2e3f720 Revert "add cleanup method to cleanup a single row"
This reverts commit b0527801d9.
2010-01-01 11:27:13 -10:00
Evan Prodromou
a9d8359208 Merge branch 'master' into 0.9.x
Conflicts:
	classes/Memcached_DataObject.php
2010-01-01 11:20:25 -10:00
Evan Prodromou
b0527801d9 add cleanup method to cleanup a single row 2010-01-01 11:02:56 -10:00
Evan Prodromou
727978332a stop using DB_DataObject's staticGet() which caches 2010-01-01 10:57:22 -10:00
Evan Prodromou
053b8c600d Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-12-31 09:14:55 -10:00
Brion Vibber
89cca01259 Take Memcached_DataObject destructor back out to check whether it might be causing some under-the-hood problems. 2009-12-30 16:42:57 -08:00
Brion Vibber
ff50c2b91d Revert debugging code 2009-12-30 16:40:59 -08:00
Brion Vibber
9218cce3cd subbug debug info to check on free ordering 2009-12-30 15:55:15 -08:00
Evan Prodromou
ad8ea98cd7 Merge branch 'locshunt2' into 0.9.x
Conflicts:
	classes/User_location_prefs.php
2009-12-30 08:57:39 -10:00
Evan Prodromou
544e884d30 Add magic formula to keep DB_DataObject from treating location prefs pkey as autoincrement 2009-12-30 08:56:43 -10:00
Brion Vibber
45c9d3d729 Add progress output and optional --sleep-time parameter to triminboxes.php 2009-12-29 14:17:03 -08:00
Brion Vibber
e3850e5273 Add progress output and optional --sleep-time parameter to triminboxes.php 2009-12-29 14:16:22 -08:00
Brion Vibber
0fb114c34f Fix for saving user location preferences -- user_id field was marked as an auto-increment and wasn't getting saved with new inserts. 2009-12-29 12:49:28 -08:00
Evan Prodromou
a1b130541b Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-12-29 12:48:59 -08:00
Evan Prodromou
05e2b4d92d Merge branch 'master' into 0.9.x 2009-12-29 12:09:17 -08:00
Brion Vibber
e152bec282 Fix for saving user location preferences -- user_id field was marked as an auto-increment and wasn't getting saved with new inserts. 2009-12-29 11:46:10 -08:00
Evan Prodromou
45c4078ca9 notices are immutable, use created date for updated 2009-12-28 17:51:04 -08:00
Evan Prodromou
e3789be03f Move location-argument-handling code into a single function
Moved the important parts of the location-argument-handling stuff
to a single function. Handles defaults and overrides correctly, and
easy to use. Changed Web and API channels to use it.
2009-12-28 15:59:24 -08:00
Evan Prodromou
97f611107a More configuration options for location sharing 2009-12-28 15:58:58 -08:00
Evan Prodromou
6a6d88f0f4 user_id is primary key for user_location_prefs 2009-12-28 15:58:47 -08:00
Evan Prodromou
c1e3b2f032 remove namespace setting from location; it's unused 2009-12-28 15:58:05 -08:00
Evan Prodromou
33786b2c4e turn off exe bits 2009-12-28 15:57:54 -08:00
Evan Prodromou
51a33dc66d add user-location-prefs data objects 2009-12-28 15:57:38 -08:00
Evan Prodromou
e119362fde Merge branch 'locshunt' into 0.9.x 2009-12-28 15:49:27 -08:00
Evan Prodromou
98a579fedf Merge branch 'master' into 0.9.x 2009-12-28 15:49:14 -08:00
Evan Prodromou
ca6669538a Move location-argument-handling code into a single function
Moved the important parts of the location-argument-handling stuff
to a single function. Handles defaults and overrides correctly, and
easy to use. Changed Web and API channels to use it.
2009-12-28 15:13:15 -08:00
Evan Prodromou
39bdda9c7e More configuration options for location sharing 2009-12-28 14:43:34 -08:00
Evan Prodromou
29a1669c01 user_id is primary key for user_location_prefs 2009-12-28 14:43:14 -08:00
Evan Prodromou
bb93d6b1c7 remove namespace setting from location; it's unused 2009-12-28 14:21:07 -08:00
Evan Prodromou
bbf516b965 turn off exe bits 2009-12-28 13:59:31 -08:00
Evan Prodromou
c326824135 add user-location-prefs data objects 2009-12-28 13:59:03 -08:00
Evan Prodromou
c07f221040 check if other user exists before unsub 2009-12-28 10:42:31 -08:00
Evan Prodromou
3262930ed4 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-12-23 10:31:27 -08:00
Brion Vibber
fa0fbd0118 Fix for massively slow friends timeline query due to indexing bug introduced with repeats.
Sorting on notice.id when our primary selector was notice_inbox.user_id caused a filesort and table scan of the notice table.
Switchng to notice_inbox's notice_id means we can use our index, and everything comes right up.

Before:
mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice.id DESC LIMIT 61 OFFSET 0;
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
| id | select_type | table        | type   | possible_keys                      | key     | key_len | ref                           | rows   | Extra                                        |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
|  1 | SIMPLE      | notice_inbox | ref    | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4       | const                         | 102600 | Using index; Using temporary; Using filesort |
|  1 | SIMPLE      | notice       | eq_ref | PRIMARY                            | PRIMARY | 4       | stoica.notice_inbox.notice_id |      1 | Using index                                  |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+

After:
mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice_id DESC LIMIT 61 OFFSET 0;
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
| id | select_type | table        | type   | possible_keys                      | key     | key_len | ref                           | rows   | Extra                    |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
|  1 | SIMPLE      | notice_inbox | ref    | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4       | const                         | 102816 | Using where; Using index |
|  1 | SIMPLE      | notice       | eq_ref | PRIMARY,notice_repeatof_idx        | PRIMARY | 4       | stoica.notice_inbox.notice_id |      1 | Using where              |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
2009-12-22 20:30:41 -08:00
Brion Vibber
eab6d1c954 Fix for massively slow friends timeline query due to indexing bug introduced with repeats.
Sorting on notice.id when our primary selector was notice_inbox.user_id caused a filesort and table scan of the notice table.
Switchng to notice_inbox's notice_id means we can use our index, and everything comes right up.

Before:
mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice.id DESC LIMIT 61 OFFSET 0;
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
| id | select_type | table        | type   | possible_keys                      | key     | key_len | ref                           | rows   | Extra                                        |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
|  1 | SIMPLE      | notice_inbox | ref    | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4       | const                         | 102600 | Using index; Using temporary; Using filesort |
|  1 | SIMPLE      | notice       | eq_ref | PRIMARY                            | PRIMARY | 4       | stoica.notice_inbox.notice_id |      1 | Using index                                  |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+

After:
mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice_id DESC LIMIT 61 OFFSET 0;
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
| id | select_type | table        | type   | possible_keys                      | key     | key_len | ref                           | rows   | Extra                    |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
|  1 | SIMPLE      | notice_inbox | ref    | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4       | const                         | 102816 | Using where; Using index |
|  1 | SIMPLE      | notice       | eq_ref | PRIMARY,notice_repeatof_idx        | PRIMARY | 4       | stoica.notice_inbox.notice_id |      1 | Using where              |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
2009-12-22 20:18:27 -08:00
Evan Prodromou
f6bf952980 Merge branch 'testing' 2009-12-22 16:44:19 -08:00
Brion
38877a4922 Skip DB_DataObject's in-process cache for static gets on CLI processes.
The local process cache would grow forever, keeping things stuck in memory and preventing GC.
2009-12-22 16:24:01 -08:00
Evan Prodromou
530673b3cd Merge branch '0.9.x' into testing 2009-12-16 22:14:41 -05:00
Brion Vibber
0ca80f78fb Add doc comments listing the array parameters for User::register() and Notice::saveNew() 2009-12-16 09:27:48 -05:00
Brion Vibber
a998bda4a5 Fix UserRightsTest unit tests 2009-12-16 09:27:48 -05:00
Brion Vibber
00fb5feff8 Cleanup undefined variable notice: set a couple more null defaults for new params in Notice::saveNew().
Fixes this notice seen while using AJAX repeat button:
Notice: Undefined variable: uri in classes/Notice.php on line 243
2009-12-16 09:27:48 -05:00
Brion Vibber
e2e1843639 slight cleanup for a bit in Notice.php where a var was reused for different types, confusing tracking down a bug 2009-12-16 09:27:47 -05:00
Evan Prodromou
2a1468ec8b Merge branch '0.9.x' into testing 2009-12-15 16:24:52 -05:00
Evan Prodromou
22f02b35ad call DB_DataObject::__destruct() if it exists 2009-12-15 12:38:15 -05:00
Evan Prodromou
945661d942 take out DB_DataObject destructor 2009-12-15 12:33:17 -05:00
Evan Prodromou
797a0d79fb create a method for notification for new messages, and use it 2009-12-15 10:31:25 -05:00
Brion Vibber
b9040a7cc4 Add destructor on Memcached_DataObject to free DB_DataObject's global storage for an object when that object itself is destroyed.
Reduces some, but not all, memory leakage for long-running processes.
2009-12-14 16:36:01 -08:00
Evan Prodromou
2a8eee0e0b add friends_timeline with no repeats in it 2009-12-14 16:41:25 -05:00
Evan Prodromou
438a0d7f1c remove obsoleted getStream, getStreamDirect, getCachedStream from Notice; use stream() instead 2009-12-12 16:58:39 -05:00
Evan Prodromou
1ec54d3433 add statuses/retweeted_to_me to API 2009-12-12 16:15:23 -05:00
Evan Prodromou
698b28c95c clear repeat_of flag when a notice is deleted 2009-12-12 16:02:44 -05:00
Evan Prodromou
cfe67a9c01 add statuses/retweets_of_me to API 2009-12-12 16:00:27 -05:00
Evan Prodromou
138ce0cd05 add statuses/retweeted_by_me api action 2009-12-12 15:35:05 -05:00
Evan Prodromou
c622d14440 add statuses/retweets to API 2009-12-12 14:46:24 -05:00
Brion Vibber
727357695e Debug check to track down live error -- wrong data type sometimes being sent down to Memcached_DataObject::cacheKey() via various fetch functions, need a backtrace to track it down. 2009-12-11 14:19:18 -08:00
Evan Prodromou
afc86a86d3 save repeats from the form 2009-12-11 11:51:09 -05:00
Evan Prodromou
60754fc6de Merge branch '0.9.x' into forward 2009-12-11 11:38:08 -05:00
Evan Prodromou
79f81ad76d change Notice::saveNew() to use named arguments for little-used options 2009-12-11 11:29:51 -05:00
Evan Prodromou
81843f2acd show the repeat form in notice lists 2009-12-11 10:49:26 -05:00
Evan Prodromou
c9649f9321 reset executable bit on Notice.php and statusnet.ini 2009-12-11 10:23:36 -05:00
Evan Prodromou
da30890988 add repeat_of column to notice class 2009-12-11 10:22:56 -05:00
Evan Prodromou
e9b733e7f0 Merge branch '0.9.x' into testing 2009-12-11 09:55:47 -05:00
Evan Prodromou
433106dfc5 remove 'has forwarded' method from Profile 2009-12-10 14:40:48 -05:00
Evan Prodromou
dd098fee77 remove forward table from db scripts 2009-12-10 14:34:47 -05:00
Evan Prodromou
144faade3b move forwarding stuff to Repeat plugin 2009-12-10 13:31:16 -05:00
Craig Andrews
b07e1143cc Override login_token's sequenceKey() so that it behaves correctly 2009-12-10 13:08:24 -05:00
Evan Prodromou
fcce5a064a Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-12-08 21:18:49 -05:00
Evan Prodromou
45408142e9 reorder notices when not using memcached 2009-12-08 21:02:54 -05:00
Brenda Wallace
789378838b that pesky table named user - now quoted 2009-12-09 13:26:59 +13:00
Evan Prodromou
9dff9e6cea make sure not to forward blocked users 2009-12-08 17:42:07 -05:00
Evan Prodromou
c49ece9fb4 method to check if a profile has forwarded a notice 2009-12-08 17:20:17 -05:00
Evan Prodromou
7dd0f2fa9c pkeyGet() method for Forward and return value from saveNew() 2009-12-08 17:20:04 -05:00
Evan Prodromou
72c82a2e29 Basic function to store forwards and redistribute 2009-12-08 16:30:33 -05:00
Evan Prodromou
6bc6af667e fix exe flag 2009-12-08 15:43:34 -05:00
Evan Prodromou
0f1d0ab4d7 add DB_DataObject for forward table 2009-12-08 15:43:11 -05:00
Evan Prodromou
78fc9483d4 Merge branch '0.9.x' into testing 2009-12-08 14:43:21 -05:00
Craig Andrews
75cac0fd6b Added 'login' command that gives you a link that can be used to login to the website 2009-12-05 21:05:33 -05:00
Craig Andrews
d31b1d774e use the new htmloutputter->style() function 2009-12-04 20:20:44 -05:00
Zach Copley
d2b42577de Was deleting wrong subscription during block. Now deletes the blockee's sub if it exists. 2009-12-03 17:44:34 -08:00
Zach Copley
aef4cc0a59 Make it impossible to block (and thus unsubscribe from your
self-subscription) via the API.  Additionally, make it impossible
to block yourself or unsubscribe from yourself, period.

I also made User use the subs.php helper function for unsubscribing
during a block.

Hopefully, these changes will get rid of the problem of people
accidentally deleting their self-subscriptions once and for all
(knock on wood).
2009-12-03 17:06:58 -08:00
Zach Copley
9dc888894b Merge branch 'master' into 0.9.x
* master: (67 commits)
  Ticket 2038: fix bad bug tracker link
  Fix regression in group posting: bug introduced in commit 1319002e15. Need to use actual profile object rather than an id on a variable that doesn't exist when checking blocks :D
  Log database errors when saving notice_inbox entries
  Drop the username from the log id for now; seems to trigger an error loop in some circumstances
  request id on logs... pid + random id per web request + username + method + url
  Add OpenID ini info back into statusnet.ini as a stopgap until we can
  Some changes to the OpenID DataObjects to make them emit the exact same
  OpenID plugin should set 'user_openid.display' as unique key
  Remove relationship: user_openid.user_id -> user.id. I don't think this
  Have OpenID plugin DataObjects emit their own .ini info
  Revert "Allow plugin DB_DataObject classes to not have to use the .ini file by overriding keys(), table(), and sequenceKey() for them"
  Catch and report exceptions from notice_to_omb_notice() instead of letting the OMB queue handler die.
  Fix regression in remote subscription; added hasRole() shadow method on Remote_profile.
  Fix fatal error on OMB subscription for first-timers
  Remove annoying log msg
  Drop error message on setlocale() failure; this is harmless, since we actually have a working locale set up.
  Catch uncaught exception
  Fixed bug where reply-sync bit wasn't getting saved
  Forgot to render the nav menu when on FB Connect login tab
  Facebook plugin no longer takes over Login and Connect settings nav menus
  ...

Conflicts:
	db/08to09_pg.sql
	db/statusnet_pg.sql
	locale/pt_BR/LC_MESSAGES/statusnet.mo
	plugins/Mapstraction/MapstractionPlugin.php
2009-11-30 10:28:58 -08:00
Brion Vibber
4965476998 Fix regression in group posting: bug introduced in commit 1319002e15. Need to use actual profile object rather than an id on a variable that doesn't exist when checking blocks :D 2009-11-27 14:54:55 -08:00
Brion Vibber
2b8a3e3511 Fix regression in group posting: bug introduced in commit 1319002e15. Need to use actual profile object rather than an id on a variable that doesn't exist when checking blocks :D 2009-11-27 14:52:58 -08:00
Brion Vibber
2ba67e9b62 Log database errors when saving notice_inbox entries 2009-11-27 14:21:23 -08:00
Brion Vibber
e85e47b509 Log database errors when saving notice_inbox entries 2009-11-27 14:20:57 -08:00
Zach Copley
261ee0264a Add OpenID ini info back into statusnet.ini as a stopgap until we can
get plugins to load ini info properly on status.net
2009-11-26 18:49:18 +00:00
Zach Copley
54ad3b21d7 Remove relationship: user_openid.user_id -> user.id. I don't think this
is used. And if we need it, the OpenID plugin should do it.
2009-11-25 23:55:03 +00:00
Zach Copley
2b6cf0d8b6 Revert "Allow plugin DB_DataObject classes to not have to use the .ini file by overriding keys(), table(), and sequenceKey() for them"
This reverts commit a373d07ae0.

Conflicts:

	classes/statusnet.ini
	lib/schema.php
	plugins/Authentication/AuthenticationPlugin.php
	plugins/OpenID/OpenIDPlugin.php
	plugins/UserFlag/UserFlagPlugin.php
2009-11-25 23:54:36 +00:00
Zach Copley
bd4a613c38 Merge branch 'fix-openid' into 0.9.x 2009-11-25 23:33:13 +00:00
Zach Copley
035c8cfd71 Remove relationship: user_openid.user_id -> user.id. I don't think this
is used. And if we need it, the OpenID plugin should do it.
2009-11-25 23:29:12 +00:00
Brion Vibber
b771a8bb21 Fix regression in remote subscription; added hasRole() shadow method on Remote_profile.
DB_DataObject hides errors by silently returning null for any non-existent method call, making it harder to tell what the heck's going on... the rights check for blocked remote users returned null for the check for subscribe rights, thus eval'ing to false. We now log a note in this circumstance, which would have cut about 3 hours off of the debug time.
2009-11-25 22:23:21 +00:00
Brion Vibber
4d71dbe98c Fix regression in remote subscription; added hasRole() shadow method on Remote_profile.
DB_DataObject hides errors by silently returning null for any non-existent method call, making it harder to tell what the heck's going on... the rights check for blocked remote users returned null for the check for subscribe rights, thus eval'ing to false. We now log a note in this circumstance, which would have cut about 3 hours off of the debug time.
2009-11-25 22:22:21 +00:00
Zach Copley
8acc1587b1 Revert "Allow plugin DB_DataObject classes to not have to use the .ini file by overriding keys(), table(), and sequenceKey() for them"
This reverts commit a373d07ae0.

Conflicts:

	classes/statusnet.ini
	lib/schema.php
	plugins/Authentication/AuthenticationPlugin.php
	plugins/OpenID/OpenIDPlugin.php
	plugins/UserFlag/UserFlagPlugin.php
2009-11-25 13:38:59 -08:00
Zach Copley
c0190af982 Remove annoying log msg 2009-11-25 19:23:33 +00:00
Zach Copley
40e875f9cc Remove annoying log msg 2009-11-25 19:22:09 +00:00
Craig Andrews
e9b877a4a3 correct the primary key for login_token 2009-11-20 10:56:06 -05:00
Evan Prodromou
224d82793c Revert "Added 'login' command that gives you a link that can be used to login to the website"
This reverts commit b9d40f723b.

Conflicts:

	actions/login.php
	classes/statusnet.ini
	db/08to09.sql
	db/08to09_pg.sql
	db/statusnet_pg.sql
	lib/command.php
	lib/commandinterpreter.php
2009-11-20 02:50:43 -08:00
Craig Andrews
cac5a417f2 Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x 2009-11-18 17:04:42 -05:00
Eric Helgeson
199ccdb53f Consolidate group creation into static function in User_group 2009-11-18 15:54:24 -05:00
Craig Andrews
d07df8a796 Added Authorization plugin
Added LDAPAuthorization plugin
2009-11-18 14:19:43 -05:00
Evan Prodromou
3a980a75fc Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-11-17 14:51:38 -05:00
Zach Copley
638df94f88 Need to check the Profile rather than the User. 2009-11-17 08:48:16 -08:00
Evan Prodromou
bac2d80c91 Merge branch '0.9.x' into adminpanel
Conflicts:
	classes/User.php
2009-11-17 08:04:14 -05:00
Evan Prodromou
6a1afda259 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
	classes/statusnet.ini
2009-11-17 06:25:07 -05:00
Craig Andrews
a373d07ae0 Allow plugin DB_DataObject classes to not have to use the .ini file by overriding keys(), table(), and sequenceKey() for them 2009-11-16 15:24:25 -05:00
Evan Prodromou
d59af02960 disallow email on faves from sandboxed users 2009-11-16 14:28:55 -05:00
Evan Prodromou
440af7ed7a silenced users can't send direct messages 2009-11-16 19:51:41 +01:00
Evan Prodromou
e9321a1806 more rights denied to silenced and sandboxed 2009-11-16 19:46:08 +01:00
Evan Prodromou
f1efb845e4 don't allow sandboxed users to post public notices 2009-11-16 19:22:22 +01:00
Evan Prodromou
d2145a5b7f Move rights check to profile and add right for new notices
Added a right for new notices, realized that the hasRight() method
should be on the profile, and moved it.

Makes this a less atomic commit but that's the way it goes sometimes.
2009-11-16 19:03:59 +01:00
Craig Andrews
7177585630 getGroups was not handling the case where limit=null correctly 2009-11-16 11:22:45 -05:00
Evan Prodromou
3e08309826 change uses of User_role to Profile_role 2009-11-16 16:06:52 +01:00
Evan Prodromou
dd10e9729b fix exe flag after createTable 2009-11-16 16:05:22 +01:00
Evan Prodromou
fa00aed88b remove User_role class 2009-11-16 16:04:51 +01:00
Evan Prodromou
4e00ce01a9 Rename user_role to profile_role
Renamed the user_role table to profile_role. Remote users can have a
role on the site; that 'role' may be negative (silenced or sandboxed).
2009-11-16 16:02:47 +01:00
Evan Prodromou
792590bcdc move role functions to Profile class 2009-11-16 15:52:33 +01:00
Craig Andrews
6470ccd1b8 getSubscribers and getSubscriptions were not handling the case where limit=null correctly 2009-11-16 00:19:19 -05:00
Evan Prodromou
c9475c76a8 define rights around how to silence, sandbox, and delete a user 2009-11-15 15:59:10 +01:00
Craig Andrews
ed690615de Added a User_username table that links the external username with a StatusNet user_id
Added EmailAuthenticationPlugin
Added ReverseUsernameAuthenticationPlugin
Changed the StartChangePassword and EndChangePassword events to take a user, instead of a nickname
User::allowed_nickname was declared non-static, but used as if it was static, so I made the declaration static
2009-11-12 20:12:36 -05:00
Evan Prodromou
935410e8dc Merge branch '0.9.x' into adminpanel 2009-11-11 00:22:42 -05:00
Brion Vibber
53c86c43c4 Bringing Sphinx search support up to code: broken out to a plugin, now supports multiple sites on a single server.
Upgrade notes:
* Index names have changed from hardcoded 'Identica_people' and 'Identica_notices' to use the database name and actual table names. Must reindex.

New events:
* GetSearchEngine to override default search engine class selection from plugins

New scripts:
* gen_config.php generates a sphinx.conf from database configuration (with theoretical support for status_network table, but it doesn't seem to be cleanly queriable right now without knowing the db setup info for that. Needs generalized support.)
* Replaced old sphinx-indexer.sh and sphinx-cron.sh with index_update.php

Other fixes:
* sphinx.conf.sample better matches our live config, skipping unused stopword list and using a more realistic indexer memory limit

Further notes:
* Probably doesn't work right with PostgreSQL yet; Sphinx can pull from PG but the extraction queries currently look like they use some MySQL-specific functions.
2009-11-10 13:44:40 -08:00
Evan Prodromou
1f5f5474f1 Merge branch '0.9.x' into adminpanel 2009-11-10 16:27:23 -05:00
Evan Prodromou
cb64cfb44c add geo output to statuses in json, xml, atom, rss in API 2009-11-10 16:15:05 -05:00
Brion Vibber
088081675f Revert "Remove more contractions"
This reverts commit 5ab709b739.

Missed this one yesterday...
2009-11-09 20:01:46 +01:00
Evan Prodromou
691beefd0f Merge branch '0.9.x' into adminpanel 2009-11-08 21:41:43 -05:00
Evan Prodromou
76b0e6e6f4 Merge branch '0.9.x' into adminpanel 2009-11-08 21:23:09 -05:00
Siebrand Mazeland
b10f362ede Merge branch '0.9.x' of git://gitorious.org/statusnet/mainline into 0.9.x 2009-11-08 23:33:58 +01:00
Siebrand Mazeland
5ab709b739 Remove more contractions
* doesn't
* won't
* isn't
* don't
2009-11-08 23:32:15 +01:00
Brion Vibber
fc5002015b Revert "* [Cc]an't -> [Cc]annot"
This reverts commit 0ab17f382b.
2009-11-08 23:28:51 +01:00
Siebrand Mazeland
104a47e4a2 Merge branch '0.9.x' of git://gitorious.org/statusnet/mainline into 0.9.x 2009-11-08 23:22:50 +01:00
Siebrand Mazeland
0ab17f382b * [Cc]an't -> [Cc]annot
* [Cc]ould't -> [Cc]ould not
2009-11-08 23:22:38 +01:00
Evan Prodromou
111f6a775d Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-11-08 17:06:41 -05:00
Evan Prodromou
b7e2e3fd2b Restructure theme.php to define a class Theme
For various reasons, it's nicer to have a class for theme-file paths
and such. So, I've rewritten the code for determining the locations of
theme files to be more OOPy.

I changed all the uses of the two functions in the module (theme_file
and theme_path) to use Theme::file and Theme::path respectively.

I've also removed the code in common.php that require's the module;
using a class means we can autoload it instead.
2009-11-08 17:04:46 -05:00
Brion Vibber
8d44b6a5a2 Fix bug 1962: deleteuser.php regression when OpenID plugin not enabled
The User_openid data object was explicitly listed as a related field to delete from in User::delete(); this class doesn't exist anymore by default since OpenID was broken out to a plugin.
Added UserDeleteRelated event for plugins to add related tables to delete from at user delete time.
2009-11-08 14:40:30 +01:00
Evan Prodromou
408510f527 pkeyGet() and save() methods for Config 2009-11-07 23:16:59 -05:00
Evan Prodromou
144f817109 add a break to switch in hasRight() 2009-11-07 23:15:59 -05:00
Evan Prodromou
38833af6f1 use upper-case constants for roles and rights in hasRight() 2009-11-07 19:16:54 -05:00
Evan Prodromou
eaec5b03f5 add constants for user roles 2009-11-07 19:16:33 -05:00
Evan Prodromou
1319002e15 don't distribute group notices to inboxes for users who've blocked the author 2009-11-07 12:22:00 -05:00
Craig Andrews
b9d40f723b Added 'login' command that gives you a link that can be used to login to the website 2009-11-02 18:40:49 -05:00
Evan Prodromou
a2b8303925 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
	classes/User.php
2009-11-02 18:13:04 -05:00
Evan Prodromou
61419038e5 Merge branch '0.8.x' into 0.9.x
Conflicts:
	README
2009-11-02 18:11:45 -05:00
Craig Andrews
15d0055c6f allowed_nickname blocks top level url router names 2009-11-02 15:18:56 -05:00
Brion Vibber
5581143bee Rebuilt HTTPClient class as an extension of PEAR HTTP_Request2 package, adding redirect handling and convenience functions.
Caching support will be added in future work after unit tests have been added.

* extlib: add PEAR HTTP_Request2 0.4.1 alpha
* extlib: update PEAR Net_URL2 to 0.3.0 beta for HTTP_Request2 compatibility
* moved direct usage of CURL and file_get_contents to HTTPClient class, excluding external-sourced libraries
* adapted GeonamesPlugin for new HTTPResponse interface

Note some plugins haven't been fully tested yet.
2009-11-02 09:14:15 -08:00
Brion Vibber
b22fc5b74a Revert "Rebuilt HTTPClient class as an extension of PEAR HTTP_Request2 package, adding redirect handling and convenience functions."
Going to restructure a little more before finalizing this...

This reverts commit fa37967858.
2009-11-02 07:51:29 -08:00
Brion Vibber
fa37967858 Rebuilt HTTPClient class as an extension of PEAR HTTP_Request2 package, adding redirect handling and convenience functions.
Caching support will be added in future work after unit tests have been added.

* extlib: add PEAR HTTP_Request2 0.4.1 alpha
* extlib: update PEAR Net_URL2 to 0.3.0 beta for HTTP_Request2 compatibility
* moved direct usage of CURL and file_get_contents to HTTPClient class, excluding external-sourced libraries

Note some plugins haven't been tested yet.
2009-11-02 06:31:28 -08:00
Evan Prodromou
6664528244 Revert "Blacklist all files and directories in the web root (INSTALLDIR). Much more elegant than manually keep tracking of these invalid usernames."
This reverts commit 15f9c80c28.

So, so, elegant! And so, so, incorrect!

We can't have a user named 'notice' because that would interfere with
URLs like /notice/1234. However, there is no file named 'notice' in
the Web root.

If there were a way to automatically pull out the virtual paths in the
root dir, this may make sense. Until then, we keep track here.
2009-11-01 11:09:14 -05:00
Craig Andrews
acaf07f6e8 Added an "Verify Your Identity" page to the OpenID provider 2009-10-30 13:21:37 -04:00
Craig Andrews
005f85b5ea Removed reference to 'api' action which no longer exists since api refactor 2009-10-30 01:25:52 -04:00
Evan Prodromou
5d2b35cce6 get location from a Profile 2009-10-29 14:43:25 -04:00
Evan Prodromou
e9644f03de get location from a Notice 2009-10-29 14:43:18 -04:00
Evan Prodromou
b73d6d18ba Merge branch '0.9.x' into location 2009-10-28 17:24:53 -04:00
Evan Prodromou
2df1189465 save replies in the inbox 2009-10-28 15:33:10 -04:00
Evan Prodromou
6c615f6801 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-10-28 14:21:51 -04:00
Evan Prodromou
7df082abb8 replace some boolean-evaluations with calls to empty() 2009-10-28 14:21:42 -04:00
Carlos Perilla
bf701b8235 Enable welcome bot to broadcast it's notices 2009-10-27 23:38:08 -04:00
Evan Prodromou
3c724ccd0d Merge branch '0.9.x' into location 2009-10-24 19:59:46 -04:00
Evan Prodromou
967de94665 update location while saving new profile 2009-10-23 11:47:00 -04:00
Evan Prodromou
943b2bea09 update location while registering 2009-10-23 11:46:44 -04:00
Craig Andrews
c93b9b9523 Merge commit 'refs/merge-requests/1815' of git://gitorious.org/statusnet/mainline into 0.9.x 2009-10-23 11:15:25 -04:00
Evan Prodromou
b7a4437e79 flip x flag on generated files 2009-10-21 22:43:41 -04:00
Evan Prodromou
6fc5c934ed statusnet.ini update 2009-10-21 22:43:41 -04:00
Evan Prodromou
2ed073f295 new data structures for location 2009-10-21 22:43:40 -04:00
Zach Copley
0bbc05c1d5 Merge branch '0.9.x' into TwitterBridgePlugin 2009-10-16 23:42:02 +00:00
Trever Fischer
1241e651ae Added support for profile designs to the twitter API 2009-10-15 05:16:37 -04:00
Zach Copley
0fd8e758ad Make queuing and daemons work via events 2009-10-14 04:50:16 +00:00
Evan Prodromou
4f5badda94 remove inboxes option 2009-10-13 17:38:27 -04:00
Craig Andrews
f719720e8a Merge remote branch 'statusnet/0.8.x' into 0.9.x
Conflicts:
	lib/common.php
2009-10-11 13:39:10 -04:00
Evan Prodromou
bf1c662990 Merge branch '0.8.x' into 0.9.x 2009-10-09 14:07:45 -04:00
Evan Prodromou
88e7092d23 don't write session if it's unchanged 2009-10-09 10:39:56 -04:00
Evan Prodromou
c5047fd90a Merge branch '0.8.x' into 0.9.x
Conflicts:
	classes/Profile.php
2009-10-04 03:07:37 -04:00
Evan Prodromou
18f4a7eaea reformat Notice.php 2009-10-03 20:34:40 -04:00
Brenda Wallace
bcdf31c639 added all them doxygens 2009-10-04 11:14:26 +13:00
Evan Prodromou
be513db013 copy-and-paste typo in profile deletion 2009-10-02 15:42:34 -04:00
Evan Prodromou
94e3f6bb09 also delete blocks 2009-10-02 15:29:57 -04:00
Evan Prodromou
b3b3af9a2e Merge branch '0.8.x' into deleteuser 2009-10-02 15:27:55 -04:00
Evan Prodromou
0a57d1ccee change string return from Notice::saveNew to exceptions 2009-09-29 17:16:07 -04:00
Evan Prodromou
3afcdc18f7 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-09-27 21:15:14 -04:00
Evan Prodromou
38345d0783 let hooks override standard user rights 2009-09-27 21:11:45 -04:00
Evan Prodromou
6c069312e2 user rights 2009-09-27 21:11:45 -04:00
Craig Andrews
fc2426d7ce Fix some bugs in the URL linkification, and fixed the unit test. 2009-09-27 16:52:15 -04:00
Evan Prodromou
93b7e60115 Merge branch '0.8.x' into 0.9.x
Conflicts:
	EVENTS.txt
2009-09-24 17:24:15 -04:00
Evan Prodromou
b5b3690eef Merge branch 'master' into 0.8.x 2009-09-24 17:15:36 -04:00
Evan Prodromou
8284b3cb82 Merge branch '0.8.x' into 0.9.x
Conflicts:
	actions/requesttoken.php
	classes/File.php
	install.php
	lib/noticeform.php
2009-09-23 09:45:22 -04:00
Craig Andrews
15f9c80c28 Blacklist all files and directories in the web root (INSTALLDIR). Much more elegant than manually keep tracking of these invalid usernames. 2009-09-18 17:53:06 -04:00
Evan Prodromou
46ece1178c check correct define (not backwards compatible) 2009-09-15 21:12:44 -04:00
Evan Prodromou
13147143fc Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-09-15 17:16:35 -04:00
Craig Andrews
4a97ad9efe Remove unnecessary Profile::pkeyGet
Thanks for the info, Evan.
2009-09-15 17:08:26 -04:00
Craig Andrews
bb48698416 Add missing pkeyGet override to the Profile class 2009-09-13 21:43:29 -04:00
Craig Andrews
2a06f2ac5b If there is no mimetype set, the file shouldn't be considered an enclosure 2009-09-10 21:21:01 -04:00
Evan Prodromou
e559f82e86 flip exe bit on statusnet.ini 2009-09-08 13:07:21 -07:00
Evan Prodromou
1e707008c2 flip exe bit on Deleted_notice.php 2009-09-08 13:06:46 -07:00
Evan Prodromou
3e1dc0e0b9 flip exe bit on Config.php 2009-09-08 13:06:13 -07:00
Craig Andrews
a535ccdc4e Merge remote branch 'laconica/0.8.x' into 0.9.x
Conflicts:
	lib/common.php
	lib/twitter.php
2009-09-02 16:42:15 -04:00
Craig Andrews
efcfd209ef Check "Files" of type 'application/xhtml+xml' for oEmbed in addition to just text/html 2009-09-01 23:18:39 -04:00
Evan Prodromou
55972f59f6 remove Notice::gc() for now 2009-08-29 11:59:54 -07:00
Evan Prodromou
59f47fab4a Status_network had wrong ini file 2009-08-28 10:42:49 -07:00
Evan Prodromou
c628029ef1 Status_network had wrong ini file 2009-08-28 10:42:34 -07:00
Brenda Wallace
815630fe63 used standard SQL that mysql and pgsql both like 2009-08-28 20:45:12 +12:00
Brenda Wallace
b9ea2bf1bc used standard SQL that mysql and pgsql both like 2009-08-28 20:44:11 +12:00
Brenda Wallace
b833b725a8 make use of common_database_tablename() 2009-08-28 20:42:13 +12:00
Brenda Wallace
06514aa001 fix for SQL error: ERROR: syntax error at or near ")" at character 45
http://laconi.ca/trac/ticket/1735
2009-08-28 20:05:19 +12:00
Brenda Wallace
e277c856d6 fix for SQL error: ERROR: syntax error at or near ")" at character 45
http://laconi.ca/trac/ticket/1735
2009-08-28 20:00:55 +12:00
Evan Prodromou
c0d03fc279 make URL analyzer save new info on URLs 2009-08-27 20:23:31 -07:00
Evan Prodromou
34ce75c71d remove duplicate save of Notice and streamline attachment detection 2009-08-27 20:09:07 -07:00
Evan Prodromou
35a78de93b changes to File 2009-08-27 14:53:16 -07:00
Evan Prodromou
a08c76a434 Merge branch '0.9.x' of git@gitorious.org:laconica/mainline into 0.9.x
Conflicts:
	classes/laconica.ini
2009-08-27 14:52:32 -07:00
Evan Prodromou
522008dee5 methods on User to grant, check, and revoke roles 2009-08-27 11:38:31 -07:00
Evan Prodromou
41ee56f770 flip executable bit on User_role.php 2009-08-27 11:22:24 -07:00
Evan Prodromou
f8afad03ad add data object class for user_role 2009-08-27 11:21:57 -07:00
Evan Prodromou
5d09b6b3f0 Merge branch '0.8.x' into 0.9.x
Conflicts:
	EVENTS.txt
	actions/finishremotesubscribe.php
	actions/postnotice.php
	actions/public.php
	actions/remotesubscribe.php
	actions/showstream.php
	actions/updateprofile.php
	actions/userauthorization.php
	classes/laconica.ini
	lib/common.php
	lib/oauthstore.php
	lib/omb.php
2009-08-27 11:16:45 -07:00
Evan Prodromou
f1fda6c050 Merge branch '0.8.x' into 0.9.x 2009-08-27 07:56:19 -07:00
Craig Andrews
3e362233ee Merge commit 'laconica/0.8.x' into 0.9.x 2009-08-26 21:56:59 -04:00
Craig Andrews
504c42aa7d Fix some stupid bugs, such as a mispelling of oembed 2009-08-26 21:51:54 -04:00
Craig Andrews
6d60d74093 Display linked oembed resources as enclosures if they are of non-html mime types 2009-08-26 15:40:51 -04:00
Craig Andrews
d9e8dabaf4 Save the mimetype for oEmbed linked url 2009-08-26 14:53:52 -04:00
Evan Prodromou
df86aa7214 define LACONICA and accept LACONICA for backwards compatibility 2009-08-26 10:41:36 -04:00
Evan Prodromou
3567b9d708 global search and replace for laconica -> statusnet 2009-08-25 18:53:24 -04:00
Evan Prodromou
865b716f09 change LACONICA to STATUSNET 2009-08-25 18:42:34 -04:00
Evan Prodromou
4737563b95 a distributed -> the distributed 2009-08-25 18:14:12 -04:00
Evan Prodromou
c8b8f07af1 change Laconica and Control Yourself to StatusNet in PHP files 2009-08-25 18:12:20 -04:00
Evan Prodromou
d0baab6978 Merge branch '0.8.x' into testing 2009-08-25 18:01:46 -04:00
Evan Prodromou
c87e1de017 Rename Laconica to StatusNet 2009-08-25 17:56:10 -04:00
Zach Copley
ec83890bc2 Take token field out of foreign_link
This undoes patch a49272d448
2009-08-25 15:48:06 -04:00
Craig Andrews
9fd3a41576 ftps protocol should be handled the same way as ftp
Canon urls that have a protocol followed by a host (and no path) automatcally get a trailing slash by the canon function - make the unit test match that
2009-08-24 20:44:06 -04:00
Evan Prodromou
ff87732053 Merge branch '0.8.x' into testing
Conflicts:
	actions/twitterauthorization.php
	lib/oauthclient.php
	lib/twitter.php
	lib/twitterapi.php
	lib/twitteroauthclient.php
	scripts/twitterstatusfetcher.php
2009-08-24 16:55:49 -04:00
Zach Copley
5d5b9f7022 Add new Foreign_link col to store OAuth access token 2009-08-24 11:52:06 -04:00
Evan Prodromou
9f356b55c6 Merge branch '0.9.x' into openidplugin
Conflicts:
	actions/login.php
	actions/register.php
2009-08-21 16:27:43 -04:00
Evan Prodromou
8236037bf0 Merge branch 'dbconfig' into 0.9.x
Conflicts:
	lib/common.php
2009-08-21 16:17:06 -04:00
Evan Prodromou
538dcf2eef load configuration options from database at runtime 2009-08-21 16:14:32 -04:00
Evan Prodromou
b2664e1ae2 Merge branch '0.8.x' into 0.9.x
Conflicts:
	actions/updateprofile.php
	actions/userauthorization.php
	classes/User_group.php
	index.php
	install.php
	lib/accountsettingsaction.php
	lib/logingroupnav.php
2009-08-21 15:42:11 -04:00
Evan Prodromou
888ed474a1 new class for configuration settings 2009-08-21 15:22:02 -04:00
Evan Prodromou
d5825893c8 validation code in Notice correctly checks length of content 2009-08-21 08:12:57 -04:00
Evan Prodromou
4d05afae30 Notice class has methods to check content length 2009-08-21 08:05:13 -04:00
Evan Prodromou
4d3e2daf53 check correct setting in Profile bio length 2009-08-21 07:48:14 -04:00
Evan Prodromou
d2d3418b8a Profile class has methods to check bio length 2009-08-21 07:40:46 -04:00
Evan Prodromou
d88839d167 methods for Message to check max content length 2009-08-21 07:20:59 -04:00
Evan Prodromou
92ef4895b4 can set group desc limit to unlimited without resetting global limit 2009-08-21 06:36:55 -04:00
Evan Prodromou
cd688acceb allow configurable length for user group description 2009-08-21 06:33:22 -04:00
Evan Prodromou
900ca5c50c data classes allow >140c in user group descriptions 2009-08-21 06:33:21 -04:00
Evan Prodromou
fa6b49ab38 data classes allow >140 bios in profiles 2009-08-21 06:33:21 -04:00
Evan Prodromou
4b44308988 Messages can be >140c in classes 2009-08-21 06:33:21 -04:00
Evan Prodromou
d213a8cf90 update data classes for TEXT content in notice 2009-08-21 06:33:21 -04:00
Marcel van der Boom
418a5a95ab Change the notice type defines all into class constants and adapt all files. 2009-08-20 13:11:22 -04:00
Zach Copley
c049931dc7 Return null if all columns in the compound primary key aren't specified 2009-08-18 23:46:08 +00:00
Brett Taylor
3243612e76 Prevents redirect URLs that have canonical URLs longer than 255 chars from being written to the database as their canonical. Redirecting URLs will instead be saved to the database as given.
The reason for this is that table 'file' column 'url' is a VARCHAR(255) in MySQL and it silently truncates URLs longer than 255 characters, breaking the url.

The proper fix for this is to improve this column, making its type TEXT, but there are no database changes for 0.8.x, so this is the next best thing for data integrity. A migration script for 0.9.x could be written to audit the database checking for redirects and updating these urls to their proper canonical url.
2009-08-12 16:17:02 +12:00
Adrian Lang
bbf10e5bdf common_config returns false if the config value is not set. Design::toWebColor checks with is_null. Hence the common_config value should be adjusted. 2009-08-10 16:35:09 -04:00
Craig Andrews
11086c7823 Implemented the list_all and list groups API methods as defined at http://laconi.ca/trac/wiki/ProposedGroupsAPI
Made the Autocomplete plugin also autocomplete groups
2009-08-07 18:00:04 -04:00
Adrian Lang
44b2b64247 Argh, first commit for ages and such a stupid error. Sorry. 2009-08-05 10:58:09 -05:00
Adrian Lang
ecc7090011 Argh, first commit for ages and such a stupid error. Sorry. 2009-08-05 16:05:29 +02:00
Adrian Lang
fe507928ae Fix reference to undefined variable in Design::toWebColor. 2009-08-05 15:59:18 +02:00
Eric Helgeson
36e5d2b45f Added correct null check. Created noisey errors on fresh install.
$id is not defined, should be $this->id
2009-08-04 22:11:20 -05:00
Evan Prodromou
622c0b24c3 move redirect-to-openid code to OpenID plugin 2009-08-04 13:17:43 -04:00
Evan Prodromou
2b79b4d21f Move OpenID-related files to OpenID plugin directory
As a first step to pluginizing our OpenID support, I've moved the
important OpenID-related files to a dedicated plugin directory. Many
of these classes are still referred to by libraries that are still in
core.
2009-08-04 13:01:23 -04:00
Evan Prodromou
a074cccb0e save an archive of deleted notices 2009-08-04 06:05:04 -04:00
Evan Prodromou
db53cc800f add a deleted_notice table 2009-08-04 06:05:04 -04:00
Evan Prodromou
8157336a0d don't delete during select 2009-08-02 11:18:41 -04:00
Evan Prodromou
34e8b25cee GC sessions one by one to make sure memcached gets cleared 2009-08-02 10:34:23 -04:00
Evan Prodromou
3af5774769 throw an exception rather than die() 2009-07-30 16:55:09 -04:00
Evan Prodromou
8371aea9c1 remove debugging code about processing a new URL 2009-07-30 16:38:50 -04:00
Evan Prodromou
ae81d36137 Site-wide design configuration
I added some code so that the site-wide design can be set, using the
configuration interface.

I also moved the configuration option from
$config['site']['design']['background'] to just
$config['design']['background'], but the old syntax will still work.
2009-07-30 16:24:04 -04:00
Evan Prodromou
18573632b4 New algorithm for reply_to saving
I changed the reply-to algorithm so that we only say a notice is in
reply to another notice if a) we receive that information from the Web
or API or b) it's in a "low bandwidth" (XMPP, SMS) channel, and begins
with "@nickname" or "T NICKNAME".

The goal is to avoid false-positives and make conversation trees more
accurate and useful.
2009-07-29 11:45:32 -04:00
Evan Prodromou
a5f78449b1 better check for existing DB connection runs SET NAMES UTF8 less 2009-07-27 13:51:40 -04:00
Evan Prodromou
51ac34e80c first version of deleting users 2009-07-26 13:06:38 -06:00
Evan Prodromou
0dab5f5872 Merge branch '0.8.x' of git@gitorious.org:laconica/mainline into 0.8.x 2009-07-23 14:45:44 -07:00
Evan Prodromou
749d9bfbbf Merge branch 'master' into 0.8.x
Conflicts:
	scripts/twitterstatusfetcher.php
2009-07-23 14:45:21 -07:00
Evan Prodromou
5f7fb99447 change NOTICE_GATEWAY to Notice::GATEWAY so autoloading works 2009-07-23 14:22:22 -07:00
Craig Andrews
ec453f0123 Merge commit 'br3nda/0.8.x-profile-pgfix' into 0.8.x 2009-07-23 11:13:27 -04:00
Brenda Wallace
27e525dbbc fixed up a limit offset to be ANSI SQL compliant 2009-07-23 15:07:28 +12:00
Craig Andrews
684fc5d002 Merge commit 'br3nda/0.8.x-attachmentfix' into 0.8.x 2009-07-22 10:24:34 -04:00
Craig Andrews
e70a79d6ab Merge commit 'br3nda/0.8.x-hashtags' into 0.8.x 2009-07-22 10:23:17 -04:00
Brenda Wallace
28b62f357d fixed SQL in checking for monthly quota - works in postgres and mysql 2009-07-22 17:10:41 +12:00
Brenda Wallace
2aa47096b8 missing AND in the SQL 2009-07-22 17:10:20 +12:00
Evan Prodromou
0a602725b1 Merge branch '0.8.x' of git@gitorious.org:laconica/mainline into 0.8.x 2009-07-21 12:50:45 -07:00
Evan Prodromou
eb5679b029 correctly gc sessions 2009-07-21 11:32:01 -07:00
Evan Prodromou
84fb846939 correctly gc sessions 2009-07-21 11:31:34 -07:00
Brenda Wallace
d95f45f070 turn into canonical terms before checking for unique-ness of a tag in a notice 2009-07-20 14:18:48 +12:00
Brenda Wallace
711ade9835 look for full unicode when saving tags 2009-07-20 14:01:51 +12:00
CiaranG
1139f7cad5 Merge commit 'br3nda/0.8.x-pgfixes' into 0.8.x 2009-07-19 08:05:53 +01:00
Zach Copley
6d839ae992 Removed noisy debugging statements 2009-07-17 12:41:54 -07:00
Craig Andrews
3dbbefd5ad Merge branch 'oembed-provider' into 0.8.x 2009-07-17 12:33:56 -04:00
Evan Prodromou
83cbf246a8 use a soft limit so there's not a whole bunch of deletes on every write 2009-07-16 00:26:51 -04:00
Evan Prodromou
da512ad8c2 gc inboxes on a regular basis 2009-07-16 00:19:34 -04:00
Craig Andrews
a35794e3c3 Try oEmbed discovery before using oohembed 2009-07-15 17:10:36 -04:00
Brenda Wallace
788dd66dbe add quotes around table named "user" when quote_identifiers is true 2009-07-15 20:23:52 +12:00
Brenda Wallace
565dec0e21 use quote identifiers on the user table 2009-07-15 20:18:39 +12:00
Brenda Wallace
403bb38bcd used single quotes in SQL 2009-07-15 20:18:30 +12:00
Brenda Wallace
63ea2b7c45 changed to SQL standard of LIMIT 20 OFFSET 1 etc. 2009-07-15 20:05:57 +12:00
Craig Andrews
c97957cf3e HTML "File"/attachments should probably not be considered enclosures. 2009-07-14 13:38:26 -04:00
Craig Andrews
593af9feb6 Moved the decision logic as to whether an attachment should be an enclosure to the File class 2009-07-14 13:33:40 -04:00
Toby Inkster
38784141d1 Copy isset($attachment->filename) fix from RSS 1.0 to RSS 2.0 and Atom 1.0 feeds. 2009-07-13 16:56:52 +01:00
Evan Prodromou
8b65883f9d cache frequently-used subscriber, subscription, notice and fave count values 2009-07-09 17:28:38 -07:00
Zach Copley
db58756275 Merge branch 'candrews-review' into 0.8.x
* candrews-review:
  Notice attachments are enclosures in feeds (Atom, RSS 1.0/RDF, and RSS 2.0).
2009-07-09 11:28:21 -07:00
Zach Copley
c981f5bcec Merge branch 'candrews-review' into 0.8.x
* candrews-review:
  maildaemon makes mail attachments into notice attachments
  File classes does not use the $FILES array directly, as users of this class aren't necessarily from the web
2009-07-09 11:22:07 -07:00
Craig Andrews
69574591d0 Notice attachments are enclosures in feeds (Atom, RSS 1.0/RDF, and RSS 2.0).
http://laconi.ca/trac/ticket/1690
2009-07-09 13:18:57 -04:00
Craig Andrews
5f72423523 File classes does not use the $FILES array directly, as users of this class aren't necessarily from the web 2009-07-07 15:55:10 -04:00
Evan Prodromou
84e676b687 Merge branch 'queuemanager' into 0.8.x 2009-07-07 11:35:00 -04:00
Evan Prodromou
d4db9d83d8 Revert "Merge branch '0.8.x' into cachenonexistent"
This reverts commit e21d2cfdb5.
2009-07-05 12:44:18 -04:00
Evan Prodromou
e21d2cfdb5 Merge branch '0.8.x' into cachenonexistent 2009-07-05 11:53:39 -04:00
Evan Prodromou
ac361791c4 fix caching of faves by own, other 2009-07-05 11:32:57 -04:00
Evan Prodromou
9f6bea473e cache failure to find in memcached 2009-07-05 11:31:39 -04:00
Evan Prodromou
cb019f7aad don't send unused variable for streams 2009-07-04 01:43:35 -04:00
Evan Prodromou
741eb1a28b Merge branch '0.8.x' into queuemanager 2009-07-03 23:34:44 -04:00
Evan Prodromou
e2f8b8d65d no limit on conversation stream 2009-07-03 10:40:23 -04:00
Evan Prodromou
5f9a4ebef4 Merge branch '0.8.x' into queuemanager 2009-07-02 08:51:10 -04:00
Evan Prodromou
4e6cd42757 conversation code changes 2009-06-30 11:50:16 -04:00
Evan Prodromou
d03b8c4276 show section with admins in sidebar of group 2009-06-29 10:22:17 -04:00
Evan Prodromou
166e4a4b58 bad string compare in Status_network 2009-06-28 14:48:19 -04:00
Evan Prodromou
d4f1637f8a fallback for www. addresses 2009-06-28 14:45:33 -04:00
Evan Prodromou
854c82cfd5 start of queuemanager code 2009-06-28 14:38:34 -04:00
Evan Prodromou
871f598dcc debug flag for sessions 2009-06-27 08:11:09 -07:00
Evan Prodromou
7af94dc125 some debugging code for sessions 2009-06-27 07:09:21 -07:00
Evan Prodromou
addfcc976a remove debugging code from Notice.php 2009-06-27 07:02:36 -07:00
Evan Prodromou
5a600a02d1 fixup perms on auto-generated files 2009-06-27 06:24:06 -07:00
Evan Prodromou
0ca22cf6e2 a memcached_dataobject class for saving sessions 2009-06-27 05:48:22 -07:00
Evan Prodromou
48d671ac39 session storage 2009-06-27 05:15:59 -07:00
Sarven Capadisli
60b47d8797 Added background-attachment:fixed for userdesigns 2009-06-26 15:20:22 +00:00
Evan Prodromou
bb04f68e93 boxcar notice inbox requests 2009-06-26 00:47:27 -07:00
Evan Prodromou
994768b821 break up big inbox queries into lots of small ones 2009-06-25 23:00:46 -07:00
Evan Prodromou
c96572c090 fix caching for conversations, again 2009-06-25 11:23:47 -07:00
Evan Prodromou
638905c270 avoid getting duplicate errors on upload 2009-06-25 11:10:34 -07:00
Evan Prodromou
4d56bc6a0a streamline the file action 2009-06-25 11:08:32 -07:00
Evan Prodromou
3ca9e85ce4 update conversations to use newer query format 2009-06-25 09:43:30 -07:00
Evan Prodromou
262f864555 don't try to load a null notice into the list 2009-06-25 02:57:16 -07:00
Evan Prodromou
79547d99cf blow cache when new notice in conversation is saved 2009-06-25 02:11:34 -07:00
Evan Prodromou
83407cc3ca change foreign_user.id to bigint (for Twitter, Facebook, etc.) 2009-06-24 14:44:02 -07:00
Zach Copley
f04a54ed2f Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
* '0.8.x' of git@gitorious.org:laconica/dev: (61 commits)
  Using default theme design values (it was previously set to identica
  Updated default colour theme and IE6 colours for transparent values
  chmod +x delete_status_network.sh
  rm -Rf, not rmdir
  script to delete a status network
  chmod allsites.php
  script to show all sites on a network
  use different name for connection and database
  use /etc/laconica/setup.cfg instead of local file
  other base directories
  On XHR notice post, calls NoticeAttachment to trigger thumbnail and
  oembed and thumbnail don't need sequences
  add innodb by default to status networks
  pwgen not pwdgen
  make pwgen command configurable
  a little sql script to drop full-text index and use innodb for profile and notice
  remove common_debug from newnotice
  append uploads to content rather than showing them double
  use a subclass for single notice items to show attachments
  make file command configurable
  ...
2009-06-23 14:29:46 -07:00
Zach Copley
31325f0995 Stop Twitter gateway notices from leaking via user faves pages 2009-06-23 13:51:23 -07:00
Evan Prodromou
e744eba7eb oembed and thumbnail don't need sequences 2009-06-23 09:52:31 -07:00
Evan Prodromou
a21a9f26c5 append uploads to content rather than showing them double 2009-06-23 07:29:43 -07:00
Zach Copley
d9bebfd651 Attachment upload server and path now configurable 2009-06-22 22:48:31 +00:00
Evan Prodromou
2e9fc34d4f change staticGet() from DB_DataObject to Memcached_DataObject for file classes 2009-06-22 14:24:40 -07:00
Evan Prodromou
05e5122802 Database changes for file tables
Some minor database changes for file tables. Namely:

 * Added a timestamp to all tables
 * Added a filename column for local files
 * Change some tables that had unnecessary auto-increment primary
   keys when they had another unique column that should act as
   the primary key
 * Change engine from MyISAM to InnoDB for a couple of files.

Also, rebuilt the DB_DataObject files for all these tables.
2009-06-22 14:19:41 -07:00
Evan Prodromou
876ab05927 Add like for search 2009-06-21 21:50:35 -07:00
Evan Prodromou
aec6456c91 Update copyright dates in files modified in 2009 2009-06-20 16:12:55 -07:00
Evan Prodromou
793a6a1155 change Controlez-Vous to Control Yourself 2009-06-20 16:00:04 -07:00
Evan Prodromou
68b34b3266 Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into 0.8.x 2009-06-18 12:22:41 -07:00
Zach Copley
e0fb15c185 Make sure we have a DB connection before setting its charset 2009-06-18 19:19:19 +00:00
Evan Prodromou
3f54840b51 Only show twitter msgs in your own inbox 2009-06-18 11:45:48 -07:00
Zach Copley
dff43c03e4 Add design_id to User_group 2009-06-17 22:16:09 -07:00
Zach Copley
6c7bdf9df6 Merge branch 'userdesign' into 0.8.x
* userdesign: (56 commits)
  Fix for background image repetition for various page heights
  Removed height:100% for better background image repetition
  A little more specific selector for notice reply
  Have user favorites page show user's design
  Placed a check to make sure there is a reply button in a notice before
  Make MailboxAction read only
  Remove stale reference to deprecated personal.php
  Uppercase hex color values
  Default to image being on, no tile after upload
  Fix sidebar color bug default design
  Update background image settings to use bitflags
  It was accidently removed
  Dynamically tile background image  and turn background image on or off
  Show a background img in settings form
  IE7/8 CSS update for user design
  Enable tiling of background imgs for Designs
  Added background image tile flag to Design
  Init styles for tile and image use on/off for user design settings
  Added form option to tile background image and to turn it on and off
  Add background dir
  ...
2009-06-17 18:49:25 -07:00
Sarven Capadisli
00736bddd1 Fix for background image repetition for various page heights 2009-06-18 01:39:37 +00:00
Evan Prodromou
420e8994f8 Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into taggedprofile 2009-06-17 15:05:24 -07:00
Evan Prodromou
07f5797f2f Make the personal tag streams actually work 2009-06-17 15:04:57 -07:00
Zach Copley
164588ef0f Merge branch '0.8.x' into userdesign 2009-06-17 21:40:52 +00:00
Robin Millette
28d02ec8cd Make oohembed endpoint configurable. 2009-06-17 16:44:33 -04:00
Robin Millette
fd6de17a4a Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into 0.8.x 2009-06-17 16:22:47 -04:00
Robin Millette
1505e3a4c3 Fixed recent attachment bug that required URLs to be posted twice to be taken into account. 2009-06-17 16:21:50 -04:00
Evan Prodromou
8384e7c7f6 Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into 0.8.x 2009-06-17 08:18:33 -07:00
Zach Copley
76cbeff33c Update background image settings to use bitflags 2009-06-17 02:35:51 -07:00
Zach Copley
3d6e30d205 Merge branch '0.8.x' into userdesign
* 0.8.x:
  Moved url handling to its proper place, from newnotice to Notice.php
  Removed more dead code.
  Brought back borders for content, navigation, aside_primary but
  Minor margin value change
  More contrast for tabs
  UI updates:
2009-06-16 22:24:11 -07:00
Zach Copley
d1ae3176b6 Enable tiling of background imgs for Designs 2009-06-16 22:18:25 -07:00
Evan Prodromou
312fd85532 names for Notice_inbox source values 2009-06-16 21:37:19 -07:00
Evan Prodromou
90b2b3f9d1 names for Notice is_local states 2009-06-16 21:37:04 -07:00
Zach Copley
7b7f119428 Added background image tile flag to Design 2009-06-16 21:36:15 -07:00
Robin Millette
befbfc9c73 Moved url handling to its proper place, from newnotice to Notice.php 2009-06-16 23:10:17 -04:00
Zach Copley
bc1f877f6e Design settings now save and displays backgrounds 2009-06-16 19:17:37 -07:00
Zach Copley
ab10db9bd1 Merge branch '0.8.x' into userdesign
* 0.8.x:
  Revert "Using neutral colour for notice hover"
  Using neutral colour for notice hover
  forgot to disinherit Memcached_DataObject in Status_network
  Add some basic memcached handling to status_network
2009-06-16 00:59:57 -07:00
Zach Copley
37cafad2e0 Another minor tweak to showCSS() CSS output 2009-06-15 22:43:06 -07:00
Zach Copley
f3199c1369 Some fixups to the CSS output of showCSS() 2009-06-15 22:39:53 -07:00
Zach Copley
4652f316cf Design class now uses WebColor class for outputting hex colors 2009-06-15 22:27:59 -07:00
Zach Copley
ef99f83963 Output custom stylesheets on design sub-Actions 2009-06-15 22:13:35 -07:00
Evan Prodromou
39117bf88c forgot to disinherit Memcached_DataObject in Status_network 2009-06-15 21:55:56 -07:00
Evan Prodromou
0a886868fb Add some basic memcached handling to status_network
Status_network can't be a subclass of Memcached_DataObject -- the
latter is too entrenched in Laconica's memc handling functions, which
aren't loaded when Status_network is running! But the importance of
caching these values can't be overstated. So, a considerably
slimmed-down version of the Memcached_DataObject code is transcribed
into Status_network.
2009-06-15 21:33:56 -07:00
Zach Copley
44343986c3 Merge branch '0.8.x' into userdesign
* 0.8.x:
  a little better query handling in redirect code
  a little better query handling in redirect code
  forgot some functions aren't available at status time
  redirect on non-canonical server name
  don't show create-a-group link if not logged in
  allow a configured base for cache keys
  Missing call to getProfile() caused verify_credentials to fail.
  change mods for setup script
  Script to set up new status networks
  strncmp -> strcasecmp
  Return network from network setup function
  Configurable avatar directory
2009-06-15 21:24:22 -07:00
Evan Prodromou
8c24a3bc92 a little better query handling in redirect code 2009-06-15 16:55:01 -07:00
Evan Prodromou
f809663245 a little better query handling in redirect code 2009-06-15 16:51:49 -07:00
Evan Prodromou
2f82a3d44c forgot some functions aren't available at status time 2009-06-15 16:43:39 -07:00
Evan Prodromou
587b7a8b2a redirect on non-canonical server name 2009-06-15 16:40:53 -07:00
Evan Prodromou
6532f0dff6 strncmp -> strcasecmp 2009-06-15 14:29:25 -07:00