diff --git a/lib/private/SystemTag/SystemTagManager.php b/lib/private/SystemTag/SystemTagManager.php index e0bd83603d..2b0ef03e47 100644 --- a/lib/private/SystemTag/SystemTagManager.php +++ b/lib/private/SystemTag/SystemTagManager.php @@ -33,7 +33,6 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; use OCP\IUserManager; use OCP\IGroupManager; use OCP\SystemTag\ISystemTag; -use OCP\UserNotFoundException; use OCP\IUser; /** @@ -409,8 +408,6 @@ class SystemTagManager implements ISystemTagManager { $this->connection->rollback(); throw $e; } - - return false; } /** @@ -419,7 +416,7 @@ class SystemTagManager implements ISystemTagManager { public function getTagGroups(ISystemTag $tag) { $groupIds = []; $query = $this->connection->getQueryBuilder(); - $query->select('*') + $query->select('gid') ->from(self::TAG_GROUP_TABLE) ->where($query->expr()->eq('systemtagid', $query->createNamedParameter($tag->getId()))) ->orderBy('gid'); diff --git a/lib/public/SystemTag/ISystemTagManager.php b/lib/public/SystemTag/ISystemTagManager.php index a2c61a8dcc..35447b05fd 100644 --- a/lib/public/SystemTag/ISystemTagManager.php +++ b/lib/public/SystemTag/ISystemTagManager.php @@ -135,7 +135,7 @@ interface ISystemTagManager { * @param ISystemTag $tag tag to check permission for * @param IUser $user user to check permission for * - * @return true if the user is allowed to assign/unassign the tag, false otherwise + * @return true if the user can see the tag, false otherwise * * @since 9.1.0 */ diff --git a/lib/public/UserNotFoundException.php b/lib/public/UserNotFoundException.php deleted file mode 100644 index b0f9eea0e8..0000000000 --- a/lib/public/UserNotFoundException.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * @copyright Copyright (c) 2016, ownCloud, Inc. - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see - * - */ - -namespace OCP; - -/** - * Exception when a user was not found - * - * @since 9.1.0 - */ -class UserNotFoundException extends \RuntimeException { - - /** - * User id that was not found - * - * @var string - */ - private $userId; - - /** - * UserNotFoundException constructor. - * - * @param string $message message - * @param int $code error code - * @param \Exception $previous previous exception - * @param string $userId user id - * - * @since 9.1.0 - */ - public function __construct($message = '', $code = 0, \Exception $previous = null, $userId = null) { - parent::__construct($message, $code, $previous); - $this->userId = $userId; - } - - /** - * Returns the user id that was not found - * - * @return string - * @since 9.1.0 - */ - public function getUserId() { - return $this->userId; - } -}