Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_mail
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_mail
Commits
97e74c47
Commit
97e74c47
authored
7 years ago
by
Torsten Oppermann
Browse files
Options
Downloads
Patches
Plain Diff
[TASK] Mail queue only for root page id
parent
5f9914d9
No related branches found
No related tags found
1 merge request
!2
Feature multiclient
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Classes/Controller/QueueController.php
+6
-2
6 additions, 2 deletions
Classes/Controller/QueueController.php
Classes/Domain/Repository/MailRepository.php
+3
-1
3 additions, 1 deletion
Classes/Domain/Repository/MailRepository.php
with
9 additions
and
3 deletions
Classes/Controller/QueueController.php
+
6
−
2
View file @
97e74c47
...
@@ -24,6 +24,7 @@ namespace SGalinski\SgMail\Controller;
...
@@ -24,6 +24,7 @@ namespace SGalinski\SgMail\Controller;
*
*
* This copyright notice MUST APPEAR in all copies of the script!
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
***************************************************************/
use
SGalinski\SgMail\Service\BackendService
;
use
SGalinski\SgMail\Service\MailTemplateService
;
use
SGalinski\SgMail\Service\MailTemplateService
;
use
TYPO3\CMS\Backend\Template\Components\ButtonBar
;
use
TYPO3\CMS\Backend\Template\Components\ButtonBar
;
use
TYPO3\CMS\Backend\Template\Components\DocHeaderComponent
;
use
TYPO3\CMS\Backend\Template\Components\DocHeaderComponent
;
...
@@ -68,10 +69,13 @@ class QueueController extends ActionController {
...
@@ -68,10 +69,13 @@ class QueueController extends ActionController {
$selectedExtension
=
key
(
$registerArray
);
$selectedExtension
=
key
(
$registerArray
);
$selectedTemplate
=
key
(
$registerArray
[
$selectedExtension
]);
$selectedTemplate
=
key
(
$registerArray
[
$selectedExtension
]);
}
}
$queue
=
$this
->
mailRepository
->
findAllEntries
(
$selectedExtension
,
$selectedTemplate
);
// create doc header component
$pageUid
=
(
int
)
GeneralUtility
::
_GP
(
'id'
);
$pageUid
=
(
int
)
GeneralUtility
::
_GP
(
'id'
);
$siteRootId
=
BackendService
::
getSiteRoot
(
$pageUid
)[
'uid'
];
debug
(
$siteRootId
);
$queue
=
$this
->
mailRepository
->
findAllEntries
(
$selectedExtension
,
$selectedTemplate
,
$siteRootId
);
// create doc header component
$pageInfo
=
BackendUtility
::
readPageAccess
(
$pageUid
,
$GLOBALS
[
'BE_USER'
]
->
getPagePermsClause
(
1
));
$pageInfo
=
BackendUtility
::
readPageAccess
(
$pageUid
,
$GLOBALS
[
'BE_USER'
]
->
getPagePermsClause
(
1
));
$this
->
docHeaderComponent
=
GeneralUtility
::
makeInstance
(
DocHeaderComponent
::
class
);
$this
->
docHeaderComponent
=
GeneralUtility
::
makeInstance
(
DocHeaderComponent
::
class
);
...
...
This diff is collapsed.
Click to expand it.
Classes/Domain/Repository/MailRepository.php
+
3
−
1
View file @
97e74c47
...
@@ -55,10 +55,11 @@ class MailRepository extends AbstractRepository {
...
@@ -55,10 +55,11 @@ class MailRepository extends AbstractRepository {
*
*
* @param string $extensionKey
* @param string $extensionKey
* @param string $templateName
* @param string $templateName
* @param int siteroot
* @param int $limit
* @param int $limit
* @return array|QueryResultInterface
* @return array|QueryResultInterface
*/
*/
public
function
findAllEntries
(
$extensionKey
,
$templateName
,
$limit
=
NULL
)
{
public
function
findAllEntries
(
$extensionKey
,
$templateName
,
$siteroot
=
0
,
$limit
=
NULL
)
{
$query
=
$this
->
createQuery
();
$query
=
$this
->
createQuery
();
if
(
$limit
)
{
if
(
$limit
)
{
$query
->
setLimit
(
$limit
);
$query
->
setLimit
(
$limit
);
...
@@ -66,6 +67,7 @@ class MailRepository extends AbstractRepository {
...
@@ -66,6 +67,7 @@ class MailRepository extends AbstractRepository {
$constraintsAnd
[]
=
$query
->
equals
(
'extension_key'
,
$extensionKey
);
$constraintsAnd
[]
=
$query
->
equals
(
'extension_key'
,
$extensionKey
);
$constraintsAnd
[]
=
$query
->
equals
(
'template_name'
,
$templateName
);
$constraintsAnd
[]
=
$query
->
equals
(
'template_name'
,
$templateName
);
$constraintsAnd
[]
=
$query
->
equals
(
'site_root_id'
,
(
int
)
$siteroot
);
$query
->
setOrderings
([
'tstamp'
=>
Query
::
ORDER_DESCENDING
]);
$query
->
setOrderings
([
'tstamp'
=>
Query
::
ORDER_DESCENDING
]);
return
$query
->
matching
(
$query
->
logicalAnd
(
$constraintsAnd
))
->
execute
(
TRUE
);
return
$query
->
matching
(
$query
->
logicalAnd
(
$constraintsAnd
))
->
execute
(
TRUE
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment