function streamNicknames() { if (common_config('oldschool', 'enabled')) { $osp = Old_school_prefs::staticGet('user_id', $this->id); if (!empty($osp)) { return $osp->stream_nicknames; } } return false; }
/** * Handler method * * @param array $argarray is ignored since it's now passed in in prepare() * * @return void */ function handlePost() { $user = common_current_user(); $osp = Old_school_prefs::staticGet('user_id', $user->id); $orig = null; if (!empty($osp)) { $orig = clone $osp; } else { $osp = new Old_school_prefs(); $osp->user_id = $user->id; $osp->created = common_sql_now(); } $osp->stream_mode_only = $this->boolean('stream_mode_only'); $osp->conversation_tree = $this->boolean('conversation_tree'); $osp->stream_nicknames = $this->boolean('stream_nicknames'); $osp->modified = common_sql_now(); if (!empty($orig)) { $osp->update($orig); } else { $osp->insert(); } // TRANS: Confirmation shown when user profile settings are saved. $this->showForm(_('Settings saved.'), true); return; }