Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
6
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
F
foodsharing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
201
Issues
201
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
30
Merge Requests
30
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
foodsharing-dev
foodsharing
Commits
a258c605
Commit
a258c605
authored
Dec 17, 2019
by
Johannes
Committed by
Paul-Gabriel Müller
Jan 20, 2020
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused MaintenanceControl::sleepingMode()
parent
9bad60bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
39 deletions
+0
-39
src/Modules/Maintenance/MaintenanceControl.php
src/Modules/Maintenance/MaintenanceControl.php
+0
-39
No files found.
src/Modules/Maintenance/MaintenanceControl.php
View file @
a258c605
...
...
@@ -173,45 +173,6 @@ class MaintenanceControl extends ConsoleControl
self
::
info
(
'+'
.
$counts
[
'inserts'
]
.
', -'
.
$counts
[
'deletions'
]);
}
private
function
sleepingMode
()
{
/*
* get foodsaver which are more than 30 days inactive; set to sleeping mode and send email
*/
self
::
info
(
'sleeping mode'
);
$inactive_fsids
=
array
();
if
(
$foodsaver
=
$this
->
model
->
listFoodsaverInactiveSince
(
30
))
{
foreach
(
$foodsaver
as
$fs
)
{
$inactive_fsids
[
$fs
[
'id'
]]
=
$fs
[
'id'
];
$this
->
emailHelper
->
tplMail
(
'user/sleeping_automated'
,
$fs
[
'email'
],
array
(
'name'
=>
$fs
[
'name'
],
'anrede'
=>
$this
->
translationHelper
->
s
(
'anrede_'
.
$fs
[
'geschlecht'
])
));
$this
->
infoToBotsUserDeactivated
(
$fs
);
}
$this
->
model
->
setFoodsaverInactive
(
$inactive_fsids
);
self
::
info
(
count
(
$inactive_fsids
)
.
' user going to sleep..'
);
}
/*
* get all foodsavers if they haven't logged in since 14 days and send a wake-up email
*/
if
(
$foodsaver
=
$this
->
model
->
listFoodsaverInactiveSince
(
14
))
{
foreach
(
$foodsaver
as
$fs
)
{
$this
->
emailHelper
->
tplMail
(
'user/sleeping_warning'
,
$fs
[
'email'
],
array
(
'name'
=>
$fs
[
'name'
],
'anrede'
=>
$this
->
translationHelper
->
s
(
'anrede_'
.
$fs
[
'geschlecht'
])
));
}
self
::
info
(
count
(
$foodsaver
)
.
' get a wakeup email..'
);
}
}
private
function
infoToBotsUserDeactivated
(
$foodsaver
)
{
if
(
$botschafer
=
$this
->
model
->
getUserBotschafter
(
$foodsaver
[
'id'
]))
{
...
...
Chris Oelmueller
@ChrisOelmueller
mentioned in merge request
!1640 (merged)
·
Sep 08, 2020
mentioned in merge request
!1640 (merged)
mentioned in merge request !1640
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment