kopia lustrzana https://github.com/nextcloud/social
rodzic
1dc5741139
commit
90ac28849a
|
@ -700,8 +700,8 @@ class CoreRequestBuilder {
|
||||||
$qb->orderBy($pf . '.published_time', 'desc');
|
$qb->orderBy($pf . '.published_time', 'desc');
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param IQueryBuilder $qb
|
* @param IQueryBuilder $qb
|
||||||
|
|
|
@ -207,13 +207,13 @@ class RequestQueueRequest extends RequestQueueRequestBuilder {
|
||||||
$qb->executeStatement();
|
$qb->executeStatement();
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function moveAccount(string $actorId, string $newId, string $instance): void {
|
// public function moveAccount(string $actorId, string $newId, string $instance): void {
|
||||||
// $qb = $this->getRequestQueueUpdateSql();
|
// $qb = $this->getRequestQueueUpdateSql();
|
||||||
// $qb->set('author', $qb->createNamedParameter($newId))
|
// $qb->set('author', $qb->createNamedParameter($newId))
|
||||||
// ->set('author_prim', $qb->createNamedParameter($qb->prim($newId)))
|
// ->set('author_prim', $qb->createNamedParameter($qb->prim($newId)))
|
||||||
// ->set('instance', $qb->createNamedParameter($instance));
|
// ->set('instance', $qb->createNamedParameter($instance));
|
||||||
// $qb->limitToDBField('author_prim', $qb->prim($actorId));
|
// $qb->limitToDBField('author_prim', $qb->prim($actorId));
|
||||||
//
|
//
|
||||||
// $qb->execute();
|
// $qb->execute();
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,24 +279,24 @@ class SocialClient implements IQueryRow, JsonSerializable {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
// * @return string
|
// * @return string
|
||||||
// */
|
// */
|
||||||
// public function getAuthRedirectUri(): string {
|
// public function getAuthRedirectUri(): string {
|
||||||
// return $this->authRedirectUri;
|
// return $this->authRedirectUri;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
// * @param string $authRedirectUri
|
// * @param string $authRedirectUri
|
||||||
// *
|
// *
|
||||||
// * @return SocialClient
|
// * @return SocialClient
|
||||||
// */
|
// */
|
||||||
// public function setAuthRedirectUri(string $authRedirectUri): self {
|
// public function setAuthRedirectUri(string $authRedirectUri): self {
|
||||||
// $this->authRedirectUri = $authRedirectUri;
|
// $this->authRedirectUri = $authRedirectUri;
|
||||||
//
|
//
|
||||||
// return $this;
|
// return $this;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -337,23 +337,23 @@ class SocialClient implements IQueryRow, JsonSerializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * @return array
|
// * @return array
|
||||||
// */
|
// */
|
||||||
// public function getTokenScopes(): array {
|
// public function getTokenScopes(): array {
|
||||||
// return $this->tokenScopes;
|
// return $this->tokenScopes;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
// * @param array $scopes
|
// * @param array $scopes
|
||||||
// *
|
// *
|
||||||
// * @return SocialClient
|
// * @return SocialClient
|
||||||
// */
|
// */
|
||||||
// public function setTokenScopes(array $scopes): self {
|
// public function setTokenScopes(array $scopes): self {
|
||||||
// $this->tokenScopes = $scopes;
|
// $this->tokenScopes = $scopes;
|
||||||
//
|
//
|
||||||
// return $this;
|
// return $this;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -197,83 +197,83 @@ class FediverseService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
// * @param string $address
|
// * @param string $address
|
||||||
// *
|
// *
|
||||||
// * @throws Exception
|
// * @throws Exception
|
||||||
// */
|
// */
|
||||||
// public function blockAddress(string $address) {
|
// public function blockAddress(string $address) {
|
||||||
// if ($this->isBlocked($address)) {
|
// if ($this->isBlocked($address)) {
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// if ($this->isAllowed($address)) {
|
// if ($this->isAllowed($address)) {
|
||||||
// throw new Exception($address . ' is already in the whitelist');
|
// throw new Exception($address . ' is already in the whitelist');
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// $blackList = $this->getBlockedAddresses();
|
// $blackList = $this->getBlockedAddresses();
|
||||||
// array_push($blackList, $address);
|
// array_push($blackList, $address);
|
||||||
//
|
//
|
||||||
// $this->configService->setAppValue(ConfigService::SOCIAL_BLACKLIST, json_encode($blackList));
|
// $this->configService->setAppValue(ConfigService::SOCIAL_BLACKLIST, json_encode($blackList));
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
// * @return array
|
// * @return array
|
||||||
// */
|
// */
|
||||||
// public function getBlockedAddresses(): array {
|
// public function getBlockedAddresses(): array {
|
||||||
// return json_decode($this->configService->getAppValue(ConfigService::SOCIAL_BLACKLIST));
|
// return json_decode($this->configService->getAppValue(ConfigService::SOCIAL_BLACKLIST));
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
// * @param string $address
|
// * @param string $address
|
||||||
// *
|
// *
|
||||||
// * @return bool
|
// * @return bool
|
||||||
// */
|
// */
|
||||||
// public function isBlocked(string $address): bool {
|
// public function isBlocked(string $address): bool {
|
||||||
// return (in_array('ALL', $this->getBlockedAddresses())
|
// return (in_array('ALL', $this->getBlockedAddresses())
|
||||||
// || in_array($address, $this->getBlockedAddresses()));
|
// || in_array($address, $this->getBlockedAddresses()));
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
// * @param string $address
|
// * @param string $address
|
||||||
// *
|
// *
|
||||||
// * @return void
|
// * @return void
|
||||||
// * @throws Exception
|
// * @throws Exception
|
||||||
// */
|
// */
|
||||||
// public function allowAddress(string $address) {
|
// public function allowAddress(string $address) {
|
||||||
// if ($this->isAllowed($address)) {
|
// if ($this->isAllowed($address)) {
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// if ($this->isBlocked($address)) {
|
// if ($this->isBlocked($address)) {
|
||||||
// throw new Exception($address . ' is already in the blacklist');
|
// throw new Exception($address . ' is already in the blacklist');
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// $whiteList = $this->getAllowedAddresses();
|
// $whiteList = $this->getAllowedAddresses();
|
||||||
// array_push($whiteList, $address);
|
// array_push($whiteList, $address);
|
||||||
//
|
//
|
||||||
// $this->configService->setAppValue(ConfigService::SOCIAL_WHITELIST, json_encode($whiteList));
|
// $this->configService->setAppValue(ConfigService::SOCIAL_WHITELIST, json_encode($whiteList));
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
// * @return array
|
// * @return array
|
||||||
// */
|
// */
|
||||||
// public function getAllowedAddresses(): array {
|
// public function getAllowedAddresses(): array {
|
||||||
// return json_decode($this->configService->getAppValue(ConfigService::SOCIAL_WHITELIST));
|
// return json_decode($this->configService->getAppValue(ConfigService::SOCIAL_WHITELIST));
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
// * @param string $address
|
// * @param string $address
|
||||||
// *
|
// *
|
||||||
// * @return bool
|
// * @return bool
|
||||||
// */
|
// */
|
||||||
// public function isAllowed(string $address): bool {
|
// public function isAllowed(string $address): bool {
|
||||||
// return (in_array('ALL', $this->getAllowedAddresses())
|
// return (in_array('ALL', $this->getAllowedAddresses())
|
||||||
// || in_array($address, $this->getAllowedAddresses()));
|
// || in_array($address, $this->getAllowedAddresses()));
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,16 +129,16 @@ class PushService {
|
||||||
// $pushHelper->toCallback($callback);
|
// $pushHelper->toCallback($callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
// * @param $userId
|
// * @param $userId
|
||||||
// *
|
// *
|
||||||
// * @return IPushWrapper
|
// * @return IPushWrapper
|
||||||
// * @throws PushInstallException
|
// * @throws PushInstallException
|
||||||
// */
|
// */
|
||||||
// public function testOnAccount(string $userId): IPushWrapper {
|
// public function testOnAccount(string $userId): IPushWrapper {
|
||||||
//// $pushHelper = $this->pushManager->getPushHelper();
|
//// $pushHelper = $this->pushManager->getPushHelper();
|
||||||
////
|
////
|
||||||
//// return $pushHelper->test($userId);
|
//// return $pushHelper->test($userId);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -467,27 +467,27 @@ class ExtendedQueryBuilder extends QueryBuilder implements IExtendedQueryBuilder
|
||||||
return $expr->$comp($field, $qb->createNamedParameter('%"' . $value . '"%'));
|
return $expr->$comp($field, $qb->createNamedParameter('%"' . $value . '"%'));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
// * @param IQueryBuilder $qb
|
// * @param IQueryBuilder $qb
|
||||||
// * @param string $field
|
// * @param string $field
|
||||||
// * @param string $value
|
// * @param string $value
|
||||||
// *
|
// *
|
||||||
// * @return string
|
// * @return string
|
||||||
// */
|
// */
|
||||||
// public function exprValueNotWithinJsonFormat(IQueryBuilder $qb, string $field, string $value): string {
|
// public function exprValueNotWithinJsonFormat(IQueryBuilder $qb, string $field, string $value): string {
|
||||||
// $dbConn = $this->getConnection();
|
// $dbConn = $this->getConnection();
|
||||||
// $expr = $qb->expr();
|
// $expr = $qb->expr();
|
||||||
// $func = $qb->func();
|
// $func = $qb->func();
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// return $expr->notLike(
|
// return $expr->notLike(
|
||||||
// $func->lower($field),
|
// $func->lower($field),
|
||||||
// $qb->createNamedParameter(
|
// $qb->createNamedParameter(
|
||||||
// '%"' . $func->lower($dbConn->escapeLikeParameter($value)) . '"%'
|
// '%"' . $func->lower($dbConn->escapeLikeParameter($value)) . '"%'
|
||||||
// )
|
// )
|
||||||
// );
|
// );
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Ładowanie…
Reference in New Issue