diff --git a/lib/Db/CoreRequestBuilder.php b/lib/Db/CoreRequestBuilder.php index f29f2fc7..59334187 100644 --- a/lib/Db/CoreRequestBuilder.php +++ b/lib/Db/CoreRequestBuilder.php @@ -700,8 +700,8 @@ class CoreRequestBuilder { $qb->orderBy($pf . '.published_time', 'desc'); } -// -// + // + // /** * @param IQueryBuilder $qb diff --git a/lib/Db/RequestQueueRequest.php b/lib/Db/RequestQueueRequest.php index 7ee48257..175e9ff4 100644 --- a/lib/Db/RequestQueueRequest.php +++ b/lib/Db/RequestQueueRequest.php @@ -207,13 +207,13 @@ class RequestQueueRequest extends RequestQueueRequestBuilder { $qb->executeStatement(); } -// public function moveAccount(string $actorId, string $newId, string $instance): void { -// $qb = $this->getRequestQueueUpdateSql(); -// $qb->set('author', $qb->createNamedParameter($newId)) -// ->set('author_prim', $qb->createNamedParameter($qb->prim($newId))) -// ->set('instance', $qb->createNamedParameter($instance)); -// $qb->limitToDBField('author_prim', $qb->prim($actorId)); -// -// $qb->execute(); -// } + // public function moveAccount(string $actorId, string $newId, string $instance): void { + // $qb = $this->getRequestQueueUpdateSql(); + // $qb->set('author', $qb->createNamedParameter($newId)) + // ->set('author_prim', $qb->createNamedParameter($qb->prim($newId))) + // ->set('instance', $qb->createNamedParameter($instance)); + // $qb->limitToDBField('author_prim', $qb->prim($actorId)); + // + // $qb->execute(); + // } } diff --git a/lib/Model/Client/SocialClient.php b/lib/Model/Client/SocialClient.php index 302c8173..17f24bb3 100644 --- a/lib/Model/Client/SocialClient.php +++ b/lib/Model/Client/SocialClient.php @@ -279,24 +279,24 @@ class SocialClient implements IQueryRow, JsonSerializable { return $this; } -// -// /** -// * @return string -// */ -// public function getAuthRedirectUri(): string { -// return $this->authRedirectUri; -// } -// -// /** -// * @param string $authRedirectUri -// * -// * @return SocialClient -// */ -// public function setAuthRedirectUri(string $authRedirectUri): self { -// $this->authRedirectUri = $authRedirectUri; -// -// return $this; -// } + // + // /** + // * @return string + // */ + // public function getAuthRedirectUri(): string { + // return $this->authRedirectUri; + // } + // + // /** + // * @param string $authRedirectUri + // * + // * @return SocialClient + // */ + // public function setAuthRedirectUri(string $authRedirectUri): self { + // $this->authRedirectUri = $authRedirectUri; + // + // return $this; + // } /** @@ -337,23 +337,23 @@ class SocialClient implements IQueryRow, JsonSerializable { } -// /** -// * @return array -// */ -// public function getTokenScopes(): array { -// return $this->tokenScopes; -// } -// -// /** -// * @param array $scopes -// * -// * @return SocialClient -// */ -// public function setTokenScopes(array $scopes): self { -// $this->tokenScopes = $scopes; -// -// return $this; -// } + // /** + // * @return array + // */ + // public function getTokenScopes(): array { + // return $this->tokenScopes; + // } + // + // /** + // * @param array $scopes + // * + // * @return SocialClient + // */ + // public function setTokenScopes(array $scopes): self { + // $this->tokenScopes = $scopes; + // + // return $this; + // } /** diff --git a/lib/Service/FediverseService.php b/lib/Service/FediverseService.php index 6155ce3b..4b03c87f 100644 --- a/lib/Service/FediverseService.php +++ b/lib/Service/FediverseService.php @@ -197,83 +197,83 @@ class FediverseService { } -// -// /** -// * @param string $address -// * -// * @throws Exception -// */ -// public function blockAddress(string $address) { -// if ($this->isBlocked($address)) { -// return; -// } -// -// if ($this->isAllowed($address)) { -// throw new Exception($address . ' is already in the whitelist'); -// } -// -// $blackList = $this->getBlockedAddresses(); -// array_push($blackList, $address); -// -// $this->configService->setAppValue(ConfigService::SOCIAL_BLACKLIST, json_encode($blackList)); -// } -// -// /** -// * @return array -// */ -// public function getBlockedAddresses(): array { -// return json_decode($this->configService->getAppValue(ConfigService::SOCIAL_BLACKLIST)); -// } -// -// /** -// * @param string $address -// * -// * @return bool -// */ -// public function isBlocked(string $address): bool { -// return (in_array('ALL', $this->getBlockedAddresses()) -// || in_array($address, $this->getBlockedAddresses())); -// } -// -// -// /** -// * @param string $address -// * -// * @return void -// * @throws Exception -// */ -// public function allowAddress(string $address) { -// if ($this->isAllowed($address)) { -// return; -// } -// -// if ($this->isBlocked($address)) { -// throw new Exception($address . ' is already in the blacklist'); -// } -// -// $whiteList = $this->getAllowedAddresses(); -// array_push($whiteList, $address); -// -// $this->configService->setAppValue(ConfigService::SOCIAL_WHITELIST, json_encode($whiteList)); -// } -// -// /** -// * @return array -// */ -// public function getAllowedAddresses(): array { -// return json_decode($this->configService->getAppValue(ConfigService::SOCIAL_WHITELIST)); -// -// } -// -// /** -// * @param string $address -// * -// * @return bool -// */ -// public function isAllowed(string $address): bool { -// return (in_array('ALL', $this->getAllowedAddresses()) -// || in_array($address, $this->getAllowedAddresses())); -// } -// -// + // + // /** + // * @param string $address + // * + // * @throws Exception + // */ + // public function blockAddress(string $address) { + // if ($this->isBlocked($address)) { + // return; + // } + // + // if ($this->isAllowed($address)) { + // throw new Exception($address . ' is already in the whitelist'); + // } + // + // $blackList = $this->getBlockedAddresses(); + // array_push($blackList, $address); + // + // $this->configService->setAppValue(ConfigService::SOCIAL_BLACKLIST, json_encode($blackList)); + // } + // + // /** + // * @return array + // */ + // public function getBlockedAddresses(): array { + // return json_decode($this->configService->getAppValue(ConfigService::SOCIAL_BLACKLIST)); + // } + // + // /** + // * @param string $address + // * + // * @return bool + // */ + // public function isBlocked(string $address): bool { + // return (in_array('ALL', $this->getBlockedAddresses()) + // || in_array($address, $this->getBlockedAddresses())); + // } + // + // + // /** + // * @param string $address + // * + // * @return void + // * @throws Exception + // */ + // public function allowAddress(string $address) { + // if ($this->isAllowed($address)) { + // return; + // } + // + // if ($this->isBlocked($address)) { + // throw new Exception($address . ' is already in the blacklist'); + // } + // + // $whiteList = $this->getAllowedAddresses(); + // array_push($whiteList, $address); + // + // $this->configService->setAppValue(ConfigService::SOCIAL_WHITELIST, json_encode($whiteList)); + // } + // + // /** + // * @return array + // */ + // public function getAllowedAddresses(): array { + // return json_decode($this->configService->getAppValue(ConfigService::SOCIAL_WHITELIST)); + // + // } + // + // /** + // * @param string $address + // * + // * @return bool + // */ + // public function isAllowed(string $address): bool { + // return (in_array('ALL', $this->getAllowedAddresses()) + // || in_array($address, $this->getAllowedAddresses())); + // } + // + // } diff --git a/lib/Service/PushService.php b/lib/Service/PushService.php index 7f2bffe4..8bef32a1 100644 --- a/lib/Service/PushService.php +++ b/lib/Service/PushService.php @@ -129,16 +129,16 @@ class PushService { // $pushHelper->toCallback($callback); } -// -// /** -// * @param $userId -// * -// * @return IPushWrapper -// * @throws PushInstallException -// */ -// public function testOnAccount(string $userId): IPushWrapper { -//// $pushHelper = $this->pushManager->getPushHelper(); -//// -//// return $pushHelper->test($userId); -// } + // + // /** + // * @param $userId + // * + // * @return IPushWrapper + // * @throws PushInstallException + // */ + // public function testOnAccount(string $userId): IPushWrapper { + //// $pushHelper = $this->pushManager->getPushHelper(); + //// + //// return $pushHelper->test($userId); + // } } diff --git a/lib/Tools/Db/ExtendedQueryBuilder.php b/lib/Tools/Db/ExtendedQueryBuilder.php index 50fcefbe..a32ad23e 100644 --- a/lib/Tools/Db/ExtendedQueryBuilder.php +++ b/lib/Tools/Db/ExtendedQueryBuilder.php @@ -467,27 +467,27 @@ class ExtendedQueryBuilder extends QueryBuilder implements IExtendedQueryBuilder return $expr->$comp($field, $qb->createNamedParameter('%"' . $value . '"%')); } -// -// /** -// * @param IQueryBuilder $qb -// * @param string $field -// * @param string $value -// * -// * @return string -// */ -// public function exprValueNotWithinJsonFormat(IQueryBuilder $qb, string $field, string $value): string { -// $dbConn = $this->getConnection(); -// $expr = $qb->expr(); -// $func = $qb->func(); -// -// -// return $expr->notLike( -// $func->lower($field), -// $qb->createNamedParameter( -// '%"' . $func->lower($dbConn->escapeLikeParameter($value)) . '"%' -// ) -// ); -// } + // + // /** + // * @param IQueryBuilder $qb + // * @param string $field + // * @param string $value + // * + // * @return string + // */ + // public function exprValueNotWithinJsonFormat(IQueryBuilder $qb, string $field, string $value): string { + // $dbConn = $this->getConnection(); + // $expr = $qb->expr(); + // $func = $qb->func(); + // + // + // return $expr->notLike( + // $func->lower($field), + // $qb->createNamedParameter( + // '%"' . $func->lower($dbConn->escapeLikeParameter($value)) . '"%' + // ) + // ); + // } /**