From 3dfe81b2ebd31a43e10e77cae488fa3903426b03 Mon Sep 17 00:00:00 2001 From: nuxsmin Date: Mon, 8 Oct 2018 02:27:25 +0200 Subject: [PATCH] * [ADD] Shared (public) links can now be deleted from the account's page by either the link creator or application admin. Closes #811. Thanks to @vmario89 for the feedback * [FIX] Fixed wrong behavior when refreshing public link from the account's page Signed-off-by: nuxsmin --- lib/SP/Repositories/PublicLink/PublicLinkRepository.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/SP/Repositories/PublicLink/PublicLinkRepository.php b/lib/SP/Repositories/PublicLink/PublicLinkRepository.php index b5e51833..c97d571d 100644 --- a/lib/SP/Repositories/PublicLink/PublicLinkRepository.php +++ b/lib/SP/Repositories/PublicLink/PublicLinkRepository.php @@ -516,12 +516,13 @@ final class PublicLinkRepository extends Repository implements RepositoryItemInt * @return \SP\Storage\Database\QueryResult * @throws ConstraintException * @throws QueryException + * @todo Update tests to include userId */ public function getHashForItem($itemId) { $queryData = new QueryData(); $queryData->setMapClassName(PublicLinkData::class); - $queryData->setQuery('SELECT id, `hash` FROM PublicLink WHERE itemId = ? LIMIT 1'); + $queryData->setQuery('SELECT id, `hash`, userId FROM PublicLink WHERE itemId = ? LIMIT 1'); $queryData->addParam($itemId); $queryData->setOnErrorMessage(__u('Error al obtener enlace'));