Adjust usage of Query::setColumns() & optimize imports

This commit is contained in:
Yonas Habteab 2022-06-02 19:25:36 +02:00
parent a81dfe1704
commit d64515f5ec
2 changed files with 1 additions and 3 deletions

View File

@ -71,7 +71,7 @@ trait DashboardUserManager
public static function userExist(): bool
{
$query = DashboardOwner::on(DBUtils::getConn())
->columns(['id'])
->columns('id')
->filter(Filter::equal('username', self::getUser()->getUsername()));
$found = false;

View File

@ -4,7 +4,6 @@
namespace Icinga\Web\Dashboard;
use Icinga\Exception\ConfigurationError;
use Icinga\Exception\Http\HttpNotFoundException;
use Icinga\Exception\ProgrammingError;
use Icinga\Model\Home;
@ -14,7 +13,6 @@ use Icinga\Web\Dashboard\Common\Sortable;
use Icinga\Util\DBUtils;
use Icinga\Web\Dashboard\Common\WidgetState;
use ipl\Stdlib\Filter;
use ipl\Web\Url;
use function ipl\Stdlib\get_php_type;