Bläddra i källkod

limit the --all command-line option to non deleted

Olivier Massot 4 år sedan
förälder
incheckning
277feb0642

+ 2 - 0
ot_admin/Classes/Command/ResetBeUserPermsCommand.php

@@ -85,6 +85,8 @@ class ResetBeUserPermsCommand extends Command
             $sites = $queryBuilder
                 ->select('organization_id')
                 ->from('ot_websites')
+                ->where($queryBuilder->expr()->eq('deleted', 0))
+                ->andWhere($queryBuilder->expr()->gt('organization_id', 0))
                 ->execute()
                 ->fetchAll();
 

+ 2 - 0
ot_admin/Classes/Command/UpdateRoutingIndexCommand.php

@@ -76,6 +76,8 @@ class UpdateRoutingIndexCommand extends Command
             $sites = $queryBuilder
                 ->select('organization_id')
                 ->from('ot_websites')
+                ->where($queryBuilder->expr()->eq('deleted', 0))
+                ->andWhere($queryBuilder->expr()->gt('organization_id', 0))
                 ->execute()
                 ->fetchAll();
 

+ 2 - 0
ot_admin/Classes/Command/UpdateSiteCommand.php

@@ -87,6 +87,8 @@ class UpdateSiteCommand extends Command
             $sites = $queryBuilder
                 ->select('organization_id')
                 ->from('ot_websites')
+                ->where($queryBuilder->expr()->eq('deleted', 0))
+                ->andWhere($queryBuilder->expr()->gt('organization_id', 0))
                 ->execute()
                 ->fetchAll();