$cmd->execute(new WebChannel());
return;
}
+
+ $replyto = $this->trimmed('inreplyto');
- $notice = Notice::saveNew($user->id, $content, 'web');
+ $notice = Notice::saveNew($user->id, $content, 'web', $replyto);
if (is_string($notice)) {
$this->show_form($notice);
$("form.disfavor").each(addAjaxHidden);
});
-function doreply(nick) {
+function doreply(nick,id) {
rgx_username = /^[0-9a-zA-Z\-_.]*$/;
if (nick.match(rgx_username)) {
replyto = "@" + nick + " ";
$("#status_textarea").focus();
return false;
}
+ if (id) {
+ $("#inreplyto").val(id);
+ }
}
return true;
}
common_element_start('a',
array('href' => common_local_url('newnotice',
array('replyto' => $profile->nickname)),
- 'onclick' => 'return doreply("'.$profile->nickname.'");',
+ 'onclick' => 'return doreply("'.$profile->nickname.'", '.$notice->id.');',
'title' => _('reply'),
'class' => 'replybutton'));
common_raw('→');
if ($action) {
common_hidden('returnto', $action);
}
+ # set by JavaScript
+ common_hidden('inreplyto', 'false');
common_element('input', array('id' => 'status_submit',
'name' => 'status_submit',
'type' => 'submit',