diff options
author | Evan Prodromou <evan@status.net> | 2010-02-24 23:28:41 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-02-24 23:28:41 -0500 |
commit | bd68154772e80a98e9e5c96c6df8772ce3b2a84f (patch) | |
tree | 0f287955e7a8fb8456307a1e6118edcf8d7d8e47 /classes | |
parent | 374c488cf136b378d4fb47c4a6add309694e9146 (diff) |
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.
Diffstat (limited to 'classes')
-rwxr-xr-x | classes/Local_group.php | 23 | ||||
-rw-r--r-- | classes/User_group.php | 27 | ||||
-rwxr-xr-x[-rw-r--r--] | classes/statusnet.ini | 58 |
3 files changed, 59 insertions, 49 deletions
diff --git a/classes/Local_group.php b/classes/Local_group.php new file mode 100755 index 000000000..02663048f --- /dev/null +++ b/classes/Local_group.php @@ -0,0 +1,23 @@ +<?php +/** + * Table Definition for local_group + */ +require_once 'classes/Memcached_DataObject.php'; + +class Local_group extends Memcached_DataObject +{ + ###START_AUTOCODE + /* the code below is auto generated do not remove the above tag */ + + public $__table = 'local_group'; // table name + public $group_id; // int(4) primary_key not_null + public $nickname; // varchar(64) unique_key + public $created; // datetime not_null default_0000-00-00%2000%3A00%3A00 + public $modified; // timestamp not_null default_CURRENT_TIMESTAMP + + /* Static get */ + function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('Local_group',$k,$v); } + + /* the code above is auto generated do not remove the tag below */ + ###END_AUTOCODE +} diff --git a/classes/User_group.php b/classes/User_group.php index 1382aa407..6e58a4d67 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -10,21 +10,22 @@ class User_group extends Memcached_DataObject public $__table = 'user_group'; // table name public $id; // int(4) primary_key not_null - public $nickname; // varchar(64) unique_key - public $fullname; // varchar(255) - public $homepage; // varchar(255) - public $description; // text() - public $location; // varchar(255) - public $original_logo; // varchar(255) - public $homepage_logo; // varchar(255) - public $stream_logo; // varchar(255) - public $mini_logo; // varchar(255) - public $design_id; // int(4) - public $created; // datetime() not_null - public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP + public $nickname; // varchar(64) + public $fullname; // varchar(255) + public $homepage; // varchar(255) + public $description; // text + public $location; // varchar(255) + public $original_logo; // varchar(255) + public $homepage_logo; // varchar(255) + public $stream_logo; // varchar(255) + public $mini_logo; // varchar(255) + public $design_id; // int(4) + public $created; // datetime not_null default_0000-00-00%2000%3A00%3A00 + public $modified; // timestamp not_null default_CURRENT_TIMESTAMP + public $uri; // varchar(255) unique_key /* Static get */ - function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('User_group',$k,$v); } + function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('User_group',$k,$v); } /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE diff --git a/classes/statusnet.ini b/classes/statusnet.ini index 81c1b68b2..d483f4741 100644..100755 --- a/classes/statusnet.ini +++ b/classes/statusnet.ini @@ -1,3 +1,4 @@ + [avatar] profile_id = 129 original = 17 @@ -55,7 +56,6 @@ modified = 384 [conversation__keys] id = N -uri = U [deleted_notice] id = 129 @@ -103,7 +103,6 @@ modified = 384 [file__keys] id = N -url = U [file_oembed] file_id = 129 @@ -245,13 +244,6 @@ modified = 384 group_id = K profile_id = K -[invitation] -code = 130 -user_id = 129 -address = 130 -address_type = 130 -created = 142 - [inbox] user_id = 129 notice_ids = 66 @@ -259,9 +251,26 @@ notice_ids = 66 [inbox__keys] user_id = K +[invitation] +code = 130 +user_id = 129 +address = 130 +address_type = 130 +created = 142 + [invitation__keys] code = K +[local_group] +group_id = 129 +nickname = 2 +created = 142 +modified = 384 + +[local_group__keys] +group_id = K +nickname = U + [location_namespace] id = 129 description = 2 @@ -369,7 +378,7 @@ icon = 130 source_url = 2 organization = 2 homepage = 2 -callback_url = 130 +callback_url = 2 type = 17 access_type = 17 created = 142 @@ -377,7 +386,6 @@ modified = 384 [oauth_application__keys] id = N -name = U [oauth_application_user] profile_id = 129 @@ -440,13 +448,13 @@ tag = K [queue_item] id = 129 -frame = 66 +frame = 194 transport = 130 created = 142 claimed = 14 [queue_item__keys] -id = K +id = N [related_group] group_id = 129 @@ -593,31 +601,10 @@ mini_logo = 2 design_id = 1 created = 142 modified = 384 +uri = 2 [user_group__keys] id = N -nickname = U - -[user_openid] -canonical = 130 -display = 130 -user_id = 129 -created = 142 -modified = 384 - -[user_openid__keys] -canonical = K -display = U - -[user_openid_trustroot] -trustroot = 130 -user_id = 129 -created = 142 -modified = 384 - -[user_openid__keys] -trustroot = K -user_id = K [user_location_prefs] user_id = 129 @@ -627,4 +614,3 @@ modified = 384 [user_location_prefs__keys] user_id = K - |