// Add to the author's timeline
+ try {
+ $profile = $notice->getProfile();
+ } catch (Exception $e) {
+ $this->log(LOG_ERR, $e->getMessage());
+ return true;
+ }
+
$user = User::staticGet('id', $notice->profile_id);
if (!empty($user)) {
// Add to the public timeline
if ($notice->is_local == Notice::LOCAL_PUBLIC ||
- ($notice->is_local == Notice::REMOTE_OMB && !common_config('public', 'localonly'))) {
+ ($notice->is_local == Notice::REMOTE && !common_config('public', 'localonly'))) {
$paths[] = array('public', null, null);
}
// root url from page output
$action->elementStart('address');
+
+ if (common_config('singleuser', 'enabled')) {
+ $user = User::singleUser();
+ $url = common_local_url('showstream', array('nickname' => $user->nickname));
+ } else {
+ $url = common_local_url('public');
+ }
+
$action->element('a', array('class' => 'url',
- 'href' => common_local_url('public')),
+ 'href' => $url),
'');
+
$action->elementEnd('address');
$action->showContentBlock();
$convurl = $conv->uri;
if(empty($convurl)) {
- $msg = sprintf( _m("Could not find Conversation ID %d to make 'in context'"
+ $msg = sprintf( "Could not find Conversation ID %d to make 'in context'"
. "link for Notice ID %d.",
$notice->conversation,
$notice->id
- ));
+ );
common_log(LOG_WARNING, $msg);
} else {
break;
case 'tag':
$tag = $action->trimmed('tag');
- if (empty($tag)) {
+ if (!empty($tag)) {
$arg1 = $tag;
} else {
$this->log(LOG_NOTICE, "Unexpected 'tag' action without tag argument");