* [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 <nuxsmin@syspass.org>
This commit is contained in:
nuxsmin
2018-10-08 02:27:25 +02:00
parent a795fa8a23
commit 3dfe81b2eb

View File

@@ -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'));