We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit d22364b3 authored by Evan Prodromou's avatar Evan Prodromou

had the order of <status> and <retweeted_status> wrong in api output

parent df7fc271
......@@ -220,18 +220,15 @@ class ApiAction extends Action
{
$base = $this->twitterSimpleStatusArray($notice, $include_user);
if (empty($notice->repeat_of)) {
return $base;
} else {
if (!empty($notice->repeat_of)) {
$original = Notice::staticGet('id', $notice->repeat_of);
if (empty($original)) {
return $base;
} else {
if (!empty($original)) {
$original_array = $this->twitterSimpleStatusArray($original, $include_user);
$original_array['retweeted_status'] = $base;
return $original_array;
$base['retweeted_status'] = $original_array;
}
}
return $base;
}
function twitterSimpleStatusArray($notice, $include_user=true)
......
......@@ -601,11 +601,13 @@ class NoticeListItem extends Widget
{
$user = common_current_user();
$todel = (empty($this->repeat)) ? $this->notice : $this->repeat;
if (!empty($user) &&
($this->notice->profile_id == $user->id || $user->hasRight(Right::DELETEOTHERSNOTICE))) {
($todel->profile_id == $user->id || $user->hasRight(Right::DELETEOTHERSNOTICE))) {
$deleteurl = common_local_url('deletenotice',
array('notice' => $this->notice->id));
array('notice' => $todel->id));
$this->out->element('a', array('href' => $deleteurl,
'class' => 'notice_delete',
'title' => _('Delete this notice')), _('Delete'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment