mirror of
https://github.com/friendica/friendica
synced 2024-11-10 03:42:53 +00:00
Fix warning 'Undefined array key "name"'
This commit is contained in:
parent
8eca961aeb
commit
8eda9dfe7c
4 changed files with 4 additions and 6 deletions
|
@ -65,9 +65,8 @@ class FollowedTags extends BaseApi
|
||||||
$saved_searches = DBA::select('search', ['id', 'term'], $condition);
|
$saved_searches = DBA::select('search', ['id', 'term'], $condition);
|
||||||
while ($saved_search = DBA::fetch($saved_searches)) {
|
while ($saved_search = DBA::fetch($saved_searches)) {
|
||||||
self::setBoundaries($saved_search['id']);
|
self::setBoundaries($saved_search['id']);
|
||||||
$tag = ['name' => ltrim($saved_search['term'], '#')];
|
|
||||||
|
|
||||||
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, $tag, [], true);
|
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, ['name' => ltrim($saved_search['term'], '#')], [], true);
|
||||||
$return[] = $hashtag->toArray();
|
$return[] = $hashtag->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,8 @@ class Tags extends BaseApi
|
||||||
|
|
||||||
$tag = ltrim($this->parameters['hashtag'], '#');
|
$tag = ltrim($this->parameters['hashtag'], '#');
|
||||||
$following = DBA::exists('search', ['uid' => $uid, 'term' => '#' . $tag]);
|
$following = DBA::exists('search', ['uid' => $uid, 'term' => '#' . $tag]);
|
||||||
$term = ['term' => $tag];
|
|
||||||
|
|
||||||
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, $term, [], $following);
|
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, ['name' => $tag], [], $following);
|
||||||
System::jsonExit($hashtag->toArray());
|
System::jsonExit($hashtag->toArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ class Follow extends BaseApi
|
||||||
DBA::insert('search', $fields);
|
DBA::insert('search', $fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, $fields, [], true);
|
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, ['name' => ltrim($this->parameters['hashtag'])], [], true);
|
||||||
System::jsonExit($hashtag->toArray());
|
System::jsonExit($hashtag->toArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ class Unfollow extends BaseApi
|
||||||
|
|
||||||
DBA::delete('search', $term);
|
DBA::delete('search', $term);
|
||||||
|
|
||||||
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, $term, [], false);
|
$hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, ['name' => ltrim($this->parameters['hashtag'])], [], false);
|
||||||
System::jsonExit($hashtag->toArray());
|
System::jsonExit($hashtag->toArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue