Commit Graph

116 Commits

Author SHA1 Message Date
Evan Prodromou
44bcc942b8 Break up stream code to use separate notice stream classes
Rearchitect (again!) notice stream code to delegate different functionality up and down the stack.

Now, different classes implement NoticeStream.
2011-03-24 18:04:19 -04:00
Evan Prodromou
0b35ce7c37 New NoticeStream class to reify streams of notices
We've been muddling through with 6- or 8-argument functions for managing streams. I'd
like to start thinking of streams as their own thing, and give them some more value.

So, the new NoticeStream class takes over the Notice::stream() function and Notice::getStreamByIds().

There's probably some fine-tuning to do on the object interface.
2011-03-23 11:29:55 -04:00
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
Brion Vibber
6bdb1053ad Pending members queue list -- doesn't yet allow approval. 2011-03-21 16:40:10 -07:00
Brion Vibber
a54eb0941e Tweaking request_queue -> group_join_queue, easier to deal with the indexes and keys and caching this way. 2011-03-21 15:05:36 -07:00
Brion Vibber
0bec9cfdbc Add request_queue table and user_group.join_policy column, for upcoming join & subscription moderation.
UI for setting the join policy is in, but not yet used.
2011-03-21 13:51:13 -07:00
Evan Prodromou
2682915b99 events for creating a group 2011-01-26 18:35:01 -07:00
Brion Vibber
281076d5f6 Fix for PHP notice spew in group creation via API: set default 'mainpage' in User_group::register() rather than forcing all callers to do it manually. 2011-01-06 13:22:44 -08:00
Brion Vibber
90c7ff1983 Merge branch 'master' into 0.9.x 2010-12-28 11:37:38 -08:00
Brion Vibber
d3d9797496 Prevent group creation by silenced users.
* adds Right::CREATEGROUP
* logic in Profile::hasRight() checks for silencing
* NewgroupAction checks for the permission before letting you see or process the form in the UI
* User_group::register() logic does a low-level check on the specified initial group admin, and rejects creation if that user doesn't have the right; guaranteeing that API methods etc will also have this restriction applied sensibly.
2010-12-28 11:34:02 -08:00
Brion Vibber
66474586af Update sorting for group inbox timelines; adds group_inbox_group_id_created_notice_id_idx index to group_inbox table 2010-12-17 14:51:37 -08:00
Brion Vibber
b0d7900530 Add getFancyName() to User_group to match the one on Profile: encapsulates the "fullname (nickname)" vs "nickname" logic and allows for localization of the parentheses in a common place. 2010-11-03 12:53:51 -07:00
Evan Prodromou
76038fe20c better deletion of related objects in User_group::delete() 2010-10-13 22:44:06 -04:00
Brion Vibber
112b6c4079 Improve cache-friendliness of user_group->delete().
Doesn't clear all possible cached entries, but this should get the ones that matter most: lookups by id, nickname, and alias. This should ensure that if a group name gets reused as a new group or alias, it should work properly.
There are some user-visible areas that aren't clear such as the 'top groups' lists on the GroupsAction sidebar; if a deleted group appears in those lists it'll go away within an hour when the cached query expires.
2010-10-12 16:29:13 -07:00
Brion Vibber
3579ccac8e Cascading deletion for user_group; doesn't yet work properly with caching. 2010-10-12 16:13:07 -07:00
Siebrand Mazeland
9587f9f55b * i18n/L10n and translator documentation updates.
* whitespace and indentation updates
2010-09-28 23:42:18 +02:00
Siebrand Mazeland
125ff142e8 * mark a few message for translation
* add translator documentation
2010-07-29 13:36:08 +02:00
Zach Copley
d3d499879c - More useful group info from api/statusnet/group/show
- Add statusnet:group_info tag to group Atom feeds
2010-06-16 14:29:24 -07:00
Brion Vibber
f72eb17304 Merge commit 'origin/testing' into 0.9.x 2010-03-12 09:41:49 -08:00
Zach Copley
78f0d6bbd2 Scrub all atom output with common_xml_safe_str() 2010-03-12 01:12:30 +00:00
Zach Copley
7cdcb89dc9 Add id and updated elements to atom source 2010-03-12 00:36:26 +00:00
Brion Vibber
b218aee94e Merge commit 'origin/testing' into 0.9.x
Conflicts:
	lib/action.php
	lib/adminpanelaction.php
2010-03-04 06:07:28 -08:00
Brion Vibber
7e5bf39f76 Avoid notice on local group creation when uri isn't passed in at create time (needs to be generated) 2010-03-03 12:57:40 -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
Brion Vibber
ddf3614c84 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x 2010-03-02 13:38:10 -08:00
Brion Vibber
6b134ae4c7 Dropped deprecated timestamp-based 'since' parameter for all API methods. When it sneaks in it can cause some very slow queries due to mismatches with the indexing.
Twitter removed 'since' support some time ago, and we've already removed it from the public timeline, so it shouldn't be missed.
2010-03-02 11:54:02 -08:00
Siebrand Mazeland
b701f5648d uri -> URI in interface text 2010-02-27 18:51:49 +01:00
Zach Copley
e61edb55d9 Rationalize group activity stuff 2010-02-25 13:34:43 -08:00
Evan Prodromou
2f03b2cc45 method for getting a group's URI 2010-02-25 12:15:26 -05:00
Evan Prodromou
d53b4b9b84 save mainpage element for groups 2010-02-25 12:05:22 -05:00
Evan Prodromou
8f42d37593 Add 'mainpage' to User_group
Add the mainpage attribute to user_group objects.
2010-02-25 09:24:29 -05:00
Evan Prodromou
e6858d7203 modify group actions so they use Local_group to look up by nickname 2010-02-25 08:44:15 -05:00
Evan Prodromou
bd68154772 Make user_group able to handle remote groups
We add a local_group table to store data about local groups. It has
the unique key for nickname, so /group/<nickname> looks up here.

Updated DB data object classes and data files.
2010-02-24 23:28:41 -05:00
Brion Vibber
d410df0406 OStatus group delivery initial implementation.
- added rel="ostatus:attention" links for group delivery
- added events for plugins to override group profile/permalink pages
- pulled Notice::saveGroups up to save-time so we can override;
  it's relatively cheap and gives us a clean list of target
  groups for distrib time even with customized delivery.
- fixed notice::getGroups to return group objects as expected
- added some doc on new parameters to Notice::saveNew
 - 'groups' list of group IDs to push to in place of parsing
- messages that come in via PuSH and contain local group targets
  are delivered to local group members
- messages that come in via PuSH and contain remote group targets
  are delivered to local members of the remote group

Todo:
- handle group posts that only come through Salmon
- handle conflicts in case something comes in both through Salmon and PuSH
- better source verification
- need a cleaner interface to look up groups by URI
- need a way to handle remote groups with conflicting names
2010-02-23 00:44:45 +00:00
Zach Copley
506c2d7491 Initial upgraded Atom output for group timelines 2010-02-12 12:24:29 -08:00
Brion Vibber
8449256817 OStatus partial support for group subscriptions:
* detection of group feeds is currently a nasty hack based on presence of '/groups/' in URL -- should use some property on the feed?
* listing for the remote group is kinda cruddy; needs to be named more cleanly
* still need to establish per-author profiles (easier once we have the updated Atom code in)
* group delivery probably not right yet
* saving of group messages still triggering some weird behavior

Added support for since_id and max_id on group timeline feeds as a free extra. Enjoy!
2010-02-09 18:32:52 -08:00
Eric Helgeson
199ccdb53f Consolidate group creation into static function in User_group 2009-11-18 15:54:24 -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
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
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
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
Brenda Wallace
565dec0e21 use quote identifiers on the user table 2009-07-15 20:18:39 +12:00
Evan Prodromou
d03b8c4276 show section with admins in sidebar of group 2009-06-29 10:22:17 -04:00
Evan Prodromou
994768b821 break up big inbox queries into lots of small ones 2009-06-25 23:00:46 -07:00
Zach Copley
dff43c03e4 Add design_id to User_group 2009-06-17 22:16:09 -07:00
Evan Prodromou
1b6b00a6d0 Link and distribute notices tagged for a group alias
Correctly link and distribute notices tagged for a group alias. Added
a helper function, getForNickname(), to User_group, to make it easier
to get a group by its nickname or aliases.
2009-06-14 23:43:47 -07:00
Evan Prodromou
ecbd7718d5 Code for adding and saving group aliases
Added code to add and save group aliases. Like tags, aliases are
free-texted in to the group admin page. configurable max number of
aliases, default is three.
2009-06-14 23:37:24 -07:00
Evan Prodromou
f8da15bf41 Allow users to be unblocked from a group
List users who are blocked from joining a group. Add a form to let
them be unblocked. Add an action that removes the block. Includes
changes to group and groupblock classes.
2009-06-14 16:17:44 -07:00
Evan Prodromou
1c87532912 The rest of the things necessary to make group block work
Link to the group block form. Hide join button if the current user is
blocked.
2009-06-14 15:47:39 -07:00
Evan Prodromou
adfb79a9bb Merge branch '0.7.x' into 0.8.x
Conflicts:
	classes/Notice.php
	classes/Profile.php
	lib/common.php
	lib/util.php
	scripts/getvaliddaemons.php
	scripts/stopdaemons.sh
2009-06-08 11:55:32 -07:00
Zach Copley
425f9d703c Ticket #1567 - Change max_id to return notices <= ID instead of < ID 2009-05-29 16:54:24 -07:00
Zach Copley
eb76a3bbb3 Ticket #1567 - API: Change before_id parameter to max_id 2009-05-29 16:32:55 -07:00
Evan Prodromou
68d90bcab0 some class files had x bit set 2009-05-22 21:11:46 -04:00
Evan Prodromou
021b520a11 Make user group stream use IDs 2009-05-01 11:38:50 -07:00
Evan Prodromou
343cd6f205 Move common_avatar_* functions to Avatar
Moved the common_avatar_* functions to the Avatar class. Typically
either as methods on the object or as static methods. Replaced all the
uses of the functions in other modules.
2009-02-06 03:55:48 -05:00
Sean Murphy
7e975b17c5 Fixed #1134; Consolidated image scaling functions. 2009-02-04 19:32:15 -05:00
Sean Murphy
5c880bc6cc Fix for #1057; group logo transparecy (and pixilation) 2009-02-04 14:44:12 -05:00
Adrian Lang
2f37539967 Fixes #1088: Show number of group members. Unlike the bugreport requested, the stats are displayed similar to userstream stats in a section in the sidebar. Additionaly, I removed a redundant notnull if check in ShowgroupAction->showMembers, fixed a SQL error in User_group->getMembers when no limit is passed, removed return value storing of void function and added an usage of Profile->getBestName. 2009-02-01 22:24:54 +01:00
Evan Prodromou
2d6a9b4fbe whitespace in User_group 2009-01-28 22:57:29 -05:00
Evan Prodromou
50ec1cc26e Upload logos for groups 2009-01-23 08:15:29 +01:00
Evan Prodromou
6b884d9f86 Remove require_once for Memcached_DBObject from new classes 2009-01-23 02:54:38 +00:00
Evan Prodromou
7fec4ad33b Method for user groups to get a list of members 2009-01-21 09:51:55 -05:00
Evan Prodromou
26652e92f2 First pass at a group home page
This is the first pass at a group home page.
2009-01-21 02:22:10 -05:00
Evan Prodromou
bd056218f9 Generate new DB_DataObject classes for group tables 2009-01-13 00:35:41 -05:00