Skip to content
Snippets Groups Projects
Commit eaffddc6 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Limiting teaser jobs on 3 entries max, only apply teaser flag when no company constraint

parent 6b74241c
No related branches found
No related tags found
No related merge requests found
......@@ -356,8 +356,13 @@ class JobRepository extends Repository {
$constraints = [];
if (\count($companies) !== 0) {
$constraints[] = $query->in('company', $companies);
$query->setOrderings([
'featured_offer' => QueryInterface::ORDER_DESCENDING
]);
$query->setLimit(3);
} else {
$constraints[] = $query->equals('featured_offer', TRUE);
}
$constraints[] = $query->equals('featured_offer', TRUE);
return $query->matching($query->logicalAnd($constraints))->execute();
}
......
......@@ -6,7 +6,7 @@
"license": [
"GPL-2.0-or-later"
],
"version": "1.10.0",
"version": "1.10.1",
"support": {
"issues": "https://gitlab.sgalinski.de/typo3/sg_jobs"
},
......
......@@ -4,7 +4,7 @@ $EM_CONF[$_EXTKEY] = array (
'title' => 'Jobs',
'description' => 'Manage and display your Job offers.',
'category' => 'plugin',
'version' => '1.10.0',
'version' => '1.10.1',
'state' => 'stable',
'uploadfolder' => FALSE,
'createDirs' => '',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment