Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from 3ev/hide-list
Browse files Browse the repository at this point in the history
Allow for hidden lists
  • Loading branch information
muthukswamy committed Oct 7, 2015
2 parents 0bb3e6e + 91bd8e9 commit 54b1cd9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion Classes/Domain/Repository/MlistRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function initializeObject()
*/
public function addOrUpdateFromMailchimp($mcListId, array $data)
{
if (!($list = $this->findOneByMcListId($mcListId))) {
if (!($list = $this->findHiddenOneByMcListId($mcListId))) {
$list = new Mlist();
$list->setMcListId($mcListId);
$list->setMcCreatedAt($data['mc_created_at']);
Expand Down Expand Up @@ -110,4 +110,19 @@ public function findAllNotSubscribedToBy(FrontendUser $user)

return $q->execute();
}

/**
* Find list item by my_list_id even if it is hidden.
*
* @param string $mcListId
* @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface
*/
public function findHiddenOneByMcListId($mcListId)
{
$query = $this->createQuery();
$query->getQuerySettings()->setIgnoreEnableFields(true);
$query->matching($query->equals('mc_list_id', $mcListId));

return $query->execute()->getFirst();
}
}
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'title' => '3ev Mailchimp',
'description' => 'Mailchimp integration for your TYPO3 site.',
'category' => 'fe',
'version' => '1.0.0',
'version' => '1.0.1',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
Expand Down

0 comments on commit 54b1cd9

Please sign in to comment.