mirror of
https://github.com/friendica/friendica
synced 2024-12-22 20:00:16 +00:00
Merge branch 'develop' into replace-app-with-apphelper-in-tests
This commit is contained in:
commit
f7d8240d2c
5 changed files with 13 additions and 14 deletions
|
@ -9,7 +9,7 @@ namespace Friendica\Contact\FriendSuggest\Repository;
|
||||||
|
|
||||||
use Friendica\BaseRepository;
|
use Friendica\BaseRepository;
|
||||||
use Friendica\Contact\FriendSuggest\Collection;
|
use Friendica\Contact\FriendSuggest\Collection;
|
||||||
use Friendica\Contact\FriendSuggest\Entity\FriendSuggest as EntityFriendSuggest;
|
use Friendica\Contact\FriendSuggest\Entity\FriendSuggest as FriendSuggestEntity;
|
||||||
use Friendica\Contact\FriendSuggest\Exception\FriendSuggestNotFoundException;
|
use Friendica\Contact\FriendSuggest\Exception\FriendSuggestNotFoundException;
|
||||||
use Friendica\Contact\FriendSuggest\Exception\FriendSuggestPersistenceException;
|
use Friendica\Contact\FriendSuggest\Exception\FriendSuggestPersistenceException;
|
||||||
use Friendica\Contact\FriendSuggest\Factory;
|
use Friendica\Contact\FriendSuggest\Factory;
|
||||||
|
@ -30,7 +30,7 @@ class FriendSuggest extends BaseRepository
|
||||||
parent::__construct($database, $logger, $factory);
|
parent::__construct($database, $logger, $factory);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function convertToTableRow(EntityFriendSuggest $fsuggest): array
|
private function convertToTableRow(FriendSuggestEntity $fsuggest): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'uid' => $fsuggest->uid,
|
'uid' => $fsuggest->uid,
|
||||||
|
@ -47,7 +47,7 @@ class FriendSuggest extends BaseRepository
|
||||||
/**
|
/**
|
||||||
* @throws NotFoundException The underlying exception if there's no FriendSuggest with the given conditions
|
* @throws NotFoundException The underlying exception if there's no FriendSuggest with the given conditions
|
||||||
*/
|
*/
|
||||||
private function selectOne(array $condition, array $params = []): EntityFriendSuggest
|
private function selectOne(array $condition, array $params = []): FriendSuggestEntity
|
||||||
{
|
{
|
||||||
return parent::_selectOne($condition, $params);
|
return parent::_selectOne($condition, $params);
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ class FriendSuggest extends BaseRepository
|
||||||
/**
|
/**
|
||||||
* @throws FriendSuggestNotFoundException in case there's no suggestion for this id
|
* @throws FriendSuggestNotFoundException in case there's no suggestion for this id
|
||||||
*/
|
*/
|
||||||
public function selectOneById(int $id): EntityFriendSuggest
|
public function selectOneById(int $id): FriendSuggestEntity
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return $this->selectOne(['id' => $id]);
|
return $this->selectOne(['id' => $id]);
|
||||||
|
@ -96,7 +96,7 @@ class FriendSuggest extends BaseRepository
|
||||||
/**
|
/**
|
||||||
* @throws FriendSuggestNotFoundException in case the underlying storage cannot save the suggestion
|
* @throws FriendSuggestNotFoundException in case the underlying storage cannot save the suggestion
|
||||||
*/
|
*/
|
||||||
public function save(EntityFriendSuggest $fsuggest): EntityFriendSuggest
|
public function save(FriendSuggestEntity $fsuggest): FriendSuggestEntity
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$fields = $this->convertToTableRow($fsuggest);
|
$fields = $this->convertToTableRow($fsuggest);
|
||||||
|
|
|
@ -164,17 +164,17 @@ class PostMedia extends BaseEntity
|
||||||
/**
|
/**
|
||||||
* Get preview path for given media id relative to the base URL
|
* Get preview path for given media id relative to the base URL
|
||||||
*
|
*
|
||||||
* @param string $size One of the Proxy::SIZE_* constants
|
* @param string $size One of the Proxy::SIZE_* constants
|
||||||
* @param bool $blurred If "true", the preview will be blurred
|
* @param bool $blur If "true", the preview will be blurred
|
||||||
* @return string preview link
|
* @return string preview link
|
||||||
*/
|
*/
|
||||||
public function getPreviewPath(string $size = '', bool $blurred = false): string
|
public function getPreviewPath(string $size = '', bool $blur = false): string
|
||||||
{
|
{
|
||||||
$path = '/photo/preview/' .
|
$path = '/photo/preview/' .
|
||||||
(Proxy::getPixelsFromSize($size) ? Proxy::getPixelsFromSize($size) . '/' : '') .
|
(Proxy::getPixelsFromSize($size) ? Proxy::getPixelsFromSize($size) . '/' : '') .
|
||||||
$this->id;
|
$this->id;
|
||||||
|
|
||||||
if ($blurred) {
|
if ($blur) {
|
||||||
$path .= '?' . http_build_query(['blur' => true]);
|
$path .= '?' . http_build_query(['blur' => true]);
|
||||||
}
|
}
|
||||||
return $path;
|
return $path;
|
||||||
|
|
|
@ -503,10 +503,10 @@ class GServer
|
||||||
*
|
*
|
||||||
* @param UriInterface $dirtyUri
|
* @param UriInterface $dirtyUri
|
||||||
*
|
*
|
||||||
* @return string cleaned URI
|
* @return UriInterface cleaned URI
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function cleanUri(UriInterface $dirtyUri): string
|
public static function cleanUri(UriInterface $dirtyUri): UriInterface
|
||||||
{
|
{
|
||||||
return $dirtyUri
|
return $dirtyUri
|
||||||
->withUserInfo('')
|
->withUserInfo('')
|
||||||
|
|
|
@ -12,7 +12,7 @@ use Friendica\Core\Worker;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Factory\Api\Mastodon\Notification as NotificationFactory;
|
use Friendica\Factory\Api\Mastodon\Notification as NotificationFactory;
|
||||||
use Friendica\Navigation\Notifications\Entity\Notification as EntityNotification;
|
use Friendica\Navigation\Notifications\Entity\Notification as NotificationEntity;
|
||||||
use Friendica\Object\Api\Mastodon\Notification;
|
use Friendica\Object\Api\Mastodon\Notification;
|
||||||
use Minishlink\WebPush\VAPID;
|
use Minishlink\WebPush\VAPID;
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ class Subscription
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function pushByNotification(EntityNotification $notification)
|
public static function pushByNotification(NotificationEntity $notification)
|
||||||
{
|
{
|
||||||
$type = NotificationFactory::getType($notification);
|
$type = NotificationFactory::getType($notification);
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
namespace Friendica\Security\TwoFactor\Repository;
|
namespace Friendica\Security\TwoFactor\Repository;
|
||||||
|
|
||||||
use Friendica\Security\TwoFactor;
|
|
||||||
use Friendica\Database\Database;
|
use Friendica\Database\Database;
|
||||||
use Friendica\Security\TwoFactor\Exception\TrustedBrowserNotFoundException;
|
use Friendica\Security\TwoFactor\Exception\TrustedBrowserNotFoundException;
|
||||||
use Friendica\Security\TwoFactor\Exception\TrustedBrowserPersistenceException;
|
use Friendica\Security\TwoFactor\Exception\TrustedBrowserPersistenceException;
|
||||||
|
|
Loading…
Reference in a new issue