diff --git a/lib/Api/Restful.php b/lib/Api/Restful.php index 25c2535..f0e4ded 100644 --- a/lib/Api/Restful.php +++ b/lib/Api/Restful.php @@ -17,7 +17,7 @@ public static function init(): void 'path' => '/neues/entry/5.0.0/', 'auth' => '\rex_yform_rest_auth_token::checkToken', 'type' => Entry::class, - 'query' => Entry::query()->where('status', 1, '>='), + 'query' => Entry::query()->where('status', 1), 'get' => [ 'fields' => [ Entry::class => [ @@ -105,7 +105,7 @@ public static function init(): void 'path' => '/neues/category/5.0.0/', 'auth' => '\rex_yform_rest_auth_token::checkToken', 'type' => Category::class, - 'query' => Category::query()->where('status', 1, '>='), + 'query' => Category::query()->where('status', 1), 'get' => [ 'fields' => [ Category::class => [ diff --git a/lib/Entry.php b/lib/Entry.php index 647709e..2970c0c 100644 --- a/lib/Entry.php +++ b/lib/Entry.php @@ -501,7 +501,7 @@ public static function findOnline(?int $category_id = null): rex_yform_manager_c if (null !== $category_id) { return self::findByCategory($category_id); } - return self::query()->where('status', 1, '>=')->find(); + return self::query()->where('status', 1)->find(); } /** @@ -521,7 +521,7 @@ public static function findByCategory(?int $category_id = null, int $status = 1) { $query = self::query(); $alias = $query->getTableAlias(); - $query->joinRelation('category_ids', 'c')->where($alias . '.status', $status, '>=')->where('c.id', $category_id); + $query->joinRelation('category_ids', 'c')->where($alias . '.status', $status)->where('c.id', $category_id); return $query->find(); } @@ -540,7 +540,7 @@ public static function findByCategory(?int $category_id = null, int $status = 1) */ public static function findByCategoryIds(string|array|null $category_ids = null, int $status = 1): rex_yform_manager_collection { - $query = self::query()->where('status', $status, '>='); + $query = self::query()->where('status', $status); if ($category_ids) { // Wenn es ein String ist, in ein Array umwandeln diff --git a/lib/neues.php b/lib/neues.php index 3935d71..81218a9 100644 --- a/lib/neues.php +++ b/lib/neues.php @@ -27,7 +27,7 @@ class Neues public static function getList(int $rowsPerPage = 10, string $pageCursor = 'page'): string { $query = Entry::query() - ->where('status', 1, '>=') + ->where('status', 1) ->where('publishdate', rex_sql::datetime(), '<=') ->orderBy('publishdate', 'desc'); $pager = new rex_pager($rowsPerPage, $pageCursor);