mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
Improvements:
- Fix API-select - Introduce OTYPE-constants - Rename `IntroductionFactory` methods
This commit is contained in:
parent
74f3a2f90c
commit
b85511b00d
5 changed files with 14 additions and 8 deletions
|
@ -63,7 +63,7 @@ class IntroductionFactory extends BaseFactory
|
|||
*
|
||||
* @return Introduction[]
|
||||
*/
|
||||
public function getIntroList(bool $all = false, int $start = 0, int $limit = BaseNotifications::DEFAULT_PAGE_LIMIT, int $id = 0)
|
||||
public function getList(bool $all = false, int $start = 0, int $limit = BaseNotifications::DEFAULT_PAGE_LIMIT, int $id = 0)
|
||||
{
|
||||
$sql_extra = "";
|
||||
|
||||
|
@ -128,7 +128,7 @@ class IntroductionFactory extends BaseFactory
|
|||
|
||||
// Normal connection requests
|
||||
} else {
|
||||
$notification = $this->getMissingIntroData($notification);
|
||||
$notification = $this->getMissingData($notification);
|
||||
|
||||
if (empty($notification['url'])) {
|
||||
continue;
|
||||
|
@ -182,7 +182,7 @@ class IntroductionFactory extends BaseFactory
|
|||
*
|
||||
* @throws InternalServerErrorException
|
||||
*/
|
||||
private function getMissingIntroData(array $intro)
|
||||
private function getMissingData(array $intro)
|
||||
{
|
||||
// If the network and the addr isn't available from the gcontact
|
||||
// table entry, take the one of the contact table entry
|
||||
|
|
|
@ -44,6 +44,11 @@ use Psr\Log\LoggerInterface;
|
|||
*/
|
||||
class Notification extends BaseModel
|
||||
{
|
||||
const OTYPE_ITEM = 'item';
|
||||
const OTYPE_INTRO = 'intro';
|
||||
const OTYPE_MAIL = 'mail';
|
||||
const OTYPE_PERSON = 'person';
|
||||
|
||||
/** @var \Friendica\Repository\Notification */
|
||||
private $repo;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class Introductions extends BaseNotifications
|
|||
|
||||
$notifications = [
|
||||
'ident' => 'introductions',
|
||||
'notifications' => DI::factNotIntro()->getIntroList($all, self::$firstItemNum, self::ITEMS_PER_PAGE, $id),
|
||||
'notifications' => DI::factNotIntro()->getList($all, self::$firstItemNum, self::ITEMS_PER_PAGE, $id),
|
||||
];
|
||||
|
||||
return [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue