mirror of
https://github.com/friendica/friendica
synced 2025-09-02 20:45:03 +02:00
Set intro.blocked to deprecated
This commit is contained in:
parent
bf0782dc6b
commit
ed184bd592
7 changed files with 14 additions and 14 deletions
|
@ -75,7 +75,6 @@ class Introduction extends BaseDepository
|
|||
'duplex' => $introduction->duplex ? 1 : 0,
|
||||
'note' => $introduction->note,
|
||||
'hash' => $introduction->hash,
|
||||
'blocked' => $introduction->blocked ? 1 : 0,
|
||||
'ignore' => $introduction->ignore ? 1 : 0,
|
||||
'datetime' => $introduction->datetime->format(DateTimeFormat::MYSQL),
|
||||
];
|
||||
|
@ -143,7 +142,7 @@ class Introduction extends BaseDepository
|
|||
public function countActiveForUser($uid, array $params = []): int
|
||||
{
|
||||
try {
|
||||
return $this->count(['blocked' => false, 'ignore' => false, 'uid' => $uid], $params);
|
||||
return $this->count(['ignore' => false, 'uid' => $uid], $params);
|
||||
} catch (\Exception $e) {
|
||||
throw new IntroductionPersistenceException(sprintf('Cannot count Introductions for used %d', $uid), $e);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ use Friendica\BaseEntity;
|
|||
* @property-read string $note
|
||||
* @property-read string $hash
|
||||
* @property-read \DateTime $datetime
|
||||
* @property-read bool $blocked
|
||||
* @property-read bool $ignore
|
||||
* @property-read int|null $id
|
||||
*/
|
||||
|
@ -58,8 +57,6 @@ class Introduction extends BaseEntity
|
|||
/** @var \DateTime */
|
||||
protected $datetime;
|
||||
/** @var bool */
|
||||
protected $blocked;
|
||||
/** @var bool */
|
||||
protected $ignore;
|
||||
/** @var int|null */
|
||||
protected $id;
|
||||
|
@ -74,11 +71,10 @@ class Introduction extends BaseEntity
|
|||
* @param string $note
|
||||
* @param string $hash
|
||||
* @param \DateTime $datetime
|
||||
* @param bool $blocked
|
||||
* @param bool $ignore
|
||||
* @param int|null $id
|
||||
*/
|
||||
public function __construct(int $uid, int $sid, ?int $fid, ?int $cid, bool $knowyou, bool $duplex, string $note, string $hash, \DateTime $datetime, bool $blocked, bool $ignore, ?int $id)
|
||||
public function __construct(int $uid, int $sid, ?int $fid, ?int $cid, bool $knowyou, bool $duplex, string $note, string $hash, \DateTime $datetime, bool $ignore, ?int $id)
|
||||
{
|
||||
$this->uid = $uid;
|
||||
$this->sid = $sid;
|
||||
|
@ -88,7 +84,6 @@ class Introduction extends BaseEntity
|
|||
$this->duplex = $duplex;
|
||||
$this->note = $note;
|
||||
$this->hash = $hash;
|
||||
$this->blocked = $blocked;
|
||||
$this->ignore = $ignore;
|
||||
$this->id = $id;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ class Introduction extends BaseFactory implements ICanCreateFromTableRow
|
|||
$row['note'] ?? '',
|
||||
$row['hash'] ?? '',
|
||||
new \DateTime($row['datetime'] ?? 'now', new \DateTimeZone('UTC')),
|
||||
!empty($row['blocked']),
|
||||
!empty($row['ignore']),
|
||||
$row['id'] ?? null
|
||||
);
|
||||
|
@ -69,7 +68,6 @@ class Introduction extends BaseFactory implements ICanCreateFromTableRow
|
|||
'note' => $note,
|
||||
'hash' => Strings::getRandomHex(),
|
||||
'datetime' => DateTimeFormat::utcNow(),
|
||||
'blocked' => false,
|
||||
'ignore' => false,
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue