forked from GNUsocial/gnu-social
IMPORTANT: Making prev. Memcached_DataObject working again with schemaDef
Lots of the Memcached_DataObject classes stopped working when upgraded to Managed_DataObject because they lacked schemaDef(). I have _hopefully_ made it so that all the references to the table uses each class' schemaDef, rather than the more manual ColumnDef stuff. Not all plugins have been tested thoroughly yet. NOTE: This is applied with getKV calls instead of staticGet, as it was important for PHP Strict Standards compliance to avoid calling the non- static functions statically. (unfortunately DB and DB_DataObject still do this within themselves...)
This commit is contained in:
@@ -61,69 +61,9 @@ class GroupPrivateMessagePlugin extends Plugin
|
||||
$schema = Schema::get();
|
||||
|
||||
// For storing user-submitted flags on profiles
|
||||
|
||||
$schema->ensureTable('group_privacy_settings',
|
||||
array(new ColumnDef('group_id',
|
||||
'integer',
|
||||
null,
|
||||
false,
|
||||
'PRI'),
|
||||
new ColumnDef('allow_privacy',
|
||||
'integer'),
|
||||
new ColumnDef('allow_sender',
|
||||
'integer'),
|
||||
new ColumnDef('created',
|
||||
'datetime'),
|
||||
new ColumnDef('modified',
|
||||
'timestamp')));
|
||||
|
||||
$schema->ensureTable('group_message',
|
||||
array(new ColumnDef('id',
|
||||
'char',
|
||||
36,
|
||||
false,
|
||||
'PRI'),
|
||||
new ColumnDef('uri',
|
||||
'varchar',
|
||||
255,
|
||||
false,
|
||||
'UNI'),
|
||||
new ColumnDef('from_profile',
|
||||
'integer',
|
||||
null,
|
||||
false,
|
||||
'MUL'),
|
||||
new ColumnDef('to_group',
|
||||
'integer',
|
||||
null,
|
||||
false,
|
||||
'MUL'),
|
||||
new ColumnDef('content',
|
||||
'text'),
|
||||
new ColumnDef('rendered',
|
||||
'text'),
|
||||
new ColumnDef('url',
|
||||
'varchar',
|
||||
255,
|
||||
false,
|
||||
'UNI'),
|
||||
new ColumnDef('created',
|
||||
'datetime')));
|
||||
|
||||
$schema->ensureTable('group_message_profile',
|
||||
array(new ColumnDef('to_profile',
|
||||
'integer',
|
||||
null,
|
||||
false,
|
||||
'PRI'),
|
||||
new ColumnDef('group_message_id',
|
||||
'char',
|
||||
36,
|
||||
false,
|
||||
'PRI'),
|
||||
new ColumnDef('created',
|
||||
'datetime')));
|
||||
|
||||
$schema->ensureTable('group_privacy_settings', Group_privacy_settings::schemaDef());
|
||||
$schema->ensureTable('group_message', Group_message::schemaDef());
|
||||
$schema->ensureTable('group_message_profile', Group_message_profile::schemaDef());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user