site-wide option to enable old-school settings

This commit is contained in:
Evan Prodromou
2011-09-24 09:46:13 -04:00
parent ae0b4d49c7
commit ea1a11a087
3 changed files with 31 additions and 16 deletions

View File

@@ -1148,31 +1148,36 @@ class User extends Managed_DataObject
function streamModeOnly()
{
$osp = Old_school_prefs::staticGet('user_id', $this->id);
if (!empty($osp)) {
return $osp->stream_mode_only;
} else {
return false;
if (common_config('oldschool', 'enabled')) {
$osp = Old_school_prefs::staticGet('user_id', $this->id);
if (!empty($osp)) {
return $osp->stream_mode_only;
}
}
return false;
}
function conversationTree()
{
$osp = Old_school_prefs::staticGet('user_id', $this->id);
if (!empty($osp)) {
return $osp->conversation_tree;
} else {
return false;
if (common_config('oldschool', 'enabled')) {
$osp = Old_school_prefs::staticGet('user_id', $this->id);
if (!empty($osp)) {
return $osp->conversation_tree;
}
}
return false;
}
function streamNicknames()
{
$osp = Old_school_prefs::staticGet('user_id', $this->id);
if (!empty($osp)) {
return $osp->stream_nicknames;
} else {
return false;
if (common_config('oldschool', 'enabled')) {
$osp = Old_school_prefs::staticGet('user_id', $this->id);
if (!empty($osp)) {
return $osp->stream_nicknames;
}
}
return false;
}
}