Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
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
TeDomum
Nextcloud
Commits
093c308b
Unverified
Commit
093c308b
authored
5 years ago
by
Joas Schilling
Committed by
Roeland Jago Douma
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add return types
Signed-off-by:
Joas Schilling
<
coding@schilljs.com
>
parent
fb396fe4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/private/Repair/RemoveLinkShares.php
+7
-7
7 additions, 7 deletions
lib/private/Repair/RemoveLinkShares.php
with
7 additions
and
7 deletions
lib/private/Repair/RemoveLinkShares.php
+
7
−
7
View file @
093c308b
...
...
@@ -86,7 +86,7 @@ class RemoveLinkShares implements IRepairStep {
*
* @param int $id
*/
private
function
deleteShare
(
int
$id
)
{
private
function
deleteShare
(
int
$id
)
:
void
{
$qb
=
$this
->
connection
->
getQueryBuilder
();
$qb
->
delete
(
'share'
)
->
where
(
$qb
->
expr
()
->
eq
(
'id'
,
$qb
->
createNamedParameter
(
$id
)));
...
...
@@ -162,7 +162,7 @@ class RemoveLinkShares implements IRepairStep {
*
* @param array $data
*/
private
function
processShare
(
array
$data
)
{
private
function
processShare
(
array
$data
)
:
void
{
$id
=
$data
[
'id'
];
$this
->
addToNotify
(
$data
[
'uid_owner'
]);
...
...
@@ -176,7 +176,7 @@ class RemoveLinkShares implements IRepairStep {
*
* @param string $uid
*/
private
function
addToNotify
(
string
$uid
)
{
private
function
addToNotify
(
string
$uid
)
:
void
{
if
(
!
isset
(
$this
->
userToNotify
[
$uid
]))
{
$this
->
userToNotify
[
$uid
]
=
true
;
}
...
...
@@ -185,14 +185,14 @@ class RemoveLinkShares implements IRepairStep {
/**
* Send all notifications
*/
private
function
sendNotification
()
{
private
function
sendNotification
()
:
void
{
$time
=
$this
->
timeFactory
->
getDateTime
();
$notification
=
$this
->
notificationManager
->
createNotification
();
$notification
->
setApp
(
'core'
)
->
setDateTime
(
$time
)
->
setObject
(
'repair'
,
'exposing_links'
)
->
setSubject
(
'repair_exposing_links'
,
[]
);
->
setSubject
(
'repair_exposing_links'
);
$users
=
array_keys
(
$this
->
userToNotify
);
foreach
(
$users
as
$user
)
{
...
...
@@ -201,7 +201,7 @@ class RemoveLinkShares implements IRepairStep {
}
}
private
function
repair
(
IOutput
$output
)
{
private
function
repair
(
IOutput
$output
)
:
void
{
$total
=
$this
->
getTotal
();
$output
->
startProgress
(
$total
);
...
...
@@ -224,7 +224,7 @@ class RemoveLinkShares implements IRepairStep {
$this
->
sendNotification
();
}
public
function
run
(
IOutput
$output
)
{
public
function
run
(
IOutput
$output
)
:
void
{
if
(
$this
->
shouldRun
())
{
$output
->
info
(
'Removing potentially over exposing link shares'
);
$this
->
repair
(
$output
);
...
...
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