From 70668d82240d981dedb15b9da09264aaf7a3e844 Mon Sep 17 00:00:00 2001 From: Thomas Coppein Date: Fri, 7 Oct 2022 10:39:22 +0200 Subject: [PATCH] Add: where deletedDate is null to all sites query; --- src/controllers/RedirectsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/RedirectsController.php b/src/controllers/RedirectsController.php index 844d9dd..5d57b54 100644 --- a/src/controllers/RedirectsController.php +++ b/src/controllers/RedirectsController.php @@ -36,7 +36,7 @@ public function actionIndex () ); $sites = ['null' => 'All Sites']; - foreach (Craft::$app->sites->getAllSites() as $site) + foreach (Craft::$app->sites->getAllSites()->where(['dateDeleted' => null]) as $site) $sites[$site->id] = $site->name; return $this->renderTemplate('seo/redirects', [