$schema = Schema::get();
// For storing user-submitted flags on profiles
- $schema->ensureTable('user_followeveryone_prefs',
- array(new ColumnDef('user_id', 'integer', null,
- true, 'PRI'),
- new ColumnDef('followeveryone', 'tinyint', null,
- false, null, 1)));
+ $schema->ensureTable('user_followeveryone_prefs', User_followeveryone_prefs::schemaDef());
return true;
}
- /**
- * Load related modules when needed
- *
- * @param string $cls Name of the class to be loaded
- *
- * @return boolean hook value; true means continue processing, false means stop.
- */
- function onAutoload($cls)
- {
- $dir = dirname(__FILE__);
-
- switch ($cls)
- {
- case 'User_followeveryone_prefs':
- include_once $dir . '/'.$cls.'.php';
- return false;
- default:
- return true;
- }
- }
-
/**
* Show a checkbox on the profile form to ask whether to follow everyone
*