New table for all old-school UI prefs

This commit is contained in:
Evan Prodromou
2011-09-24 07:12:34 -04:00
parent 02a30cf47c
commit ddc121c085
7 changed files with 119 additions and 72 deletions

View File

@@ -1146,11 +1146,31 @@ class User extends Managed_DataObject
mail_to_user($user, _('Password recovery requested'), $body, $headers, $confirm->address);
}
function showStreamMode()
function streamModeOnly()
{
$smp = Stream_mode_prefs::staticGet('user_id', $this->id);
if (!empty($smp)) {
return $smp->show_stream_mode;
$osp = Old_school_prefs::staticGet('user_id', $this->id);
if (!empty($osp)) {
return $osp->stream_mode_only;
} else {
return false;
}
}
function conversationTree()
{
$osp = Old_school_prefs::staticGet('user_id', $this->id);
if (!empty($osp)) {
return $osp->conversation_tree;
} else {
return false;
}
}
function streamNicknames()
{
$osp = Old_school_prefs::staticGet('user_id', $this->id);
if (!empty($osp)) {
return $osp->stream_nicknames;
} else {
return false;
}