Commit a0182975 authored by Sebastian Castro's avatar Sebastian Castro

Remove pendingForTooLong element from moderated element

parent 24bf0424
parameters:
app.version: 1.5.1
\ No newline at end of file
app.version: 1.5.2
\ No newline at end of file
......@@ -3,7 +3,7 @@
* @Author: Sebastian Castro
* @Date: 2017-03-28 15:29:03
* @Last Modified by: Sebastian Castro
* @Last Modified time: 2017-12-30 10:35:32
* @Last Modified time: 2018-01-02 16:04:23
*/
namespace Biopen\GeoDirectoryBundle\Admin\Element;
......@@ -61,7 +61,7 @@ class ElementAdminFilters extends ElementAdminAbstract
'callback' => function($queryBuilder, $alias, $field, $value)
{
if (!$value || !$value['value']) { return; }
$queryBuilder->field('moderationState')->notEqual(ModerationState::NotNeeded);
$queryBuilder->field('moderationState')->notIn([ModerationState::NotNeeded, ModerationState::PendingForTooLong]);
$queryBuilder->field('status')->gte(ElementStatus::PendingModification);
return true;
},
......
......@@ -7,7 +7,7 @@
*
* @copyright Copyright (c) 2016 Sebastian Castro - 90scastro@gmail.com
* @license MIT License
* @Last Modified time: 2017-12-12 14:48:55
* @Last Modified time: 2018-01-02 16:01:03
*/
......@@ -125,7 +125,7 @@ class ElementRepository extends DocumentRepository
$qb = $this->createQueryBuilder('BiopenGeoDirectoryBundle:Element');
if ($moderationState != null) $qb->field('moderationState')->equals($moderationState);
else $qb->field('moderationState')->notEqual(ModerationState::NotNeeded);
else $qb->field('moderationState')->notIn([ModerationState::NotNeeded, ModerationState::PendingForTooLong]);
$qb->field('status')->gte(ElementStatus::PendingModification);
if ($getCount) $qb->count();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment