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
c8427781
Unverified
Commit
c8427781
authored
4 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
implement old settings interface
Signed-off-by:
Robin Appelman
<
robin@icewind.nl
>
parent
5eb1e75e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/private/Activity/Manager.php
+5
-3
5 additions, 3 deletions
lib/private/Activity/Manager.php
lib/public/Activity/ActivitySettings.php
+21
-1
21 additions, 1 deletion
lib/public/Activity/ActivitySettings.php
with
26 additions
and
4 deletions
lib/private/Activity/Manager.php
+
5
−
3
View file @
c8427781
...
...
@@ -271,9 +271,11 @@ class Manager implements IManager {
/** @var ISetting $setting */
$setting
=
\OC
::
$server
->
query
(
$class
);
if
(
$setting
instanceof
ISetting
)
{
$setting
=
new
ActivitySettingsAdapter
(
$setting
);
}
elseif
(
!
$setting
instanceof
ActivitySettings
)
{
if
(
!
$setting
instanceof
ISetting
)
{
if
(
!
$setting
instanceof
ActivitySettings
)
{
$setting
=
new
ActivitySettingsAdapter
(
$setting
);
}
}
else
{
throw
new
\InvalidArgumentException
(
'Invalid activity filter registered'
);
}
...
...
This diff is collapsed.
Click to expand it.
lib/public/Activity/ActivitySettings.php
+
21
−
1
View file @
c8427781
...
...
@@ -26,7 +26,7 @@ namespace OCP\Activity;
/**
* @since 20.0.0
*/
abstract
class
ActivitySettings
{
abstract
class
ActivitySettings
implements
ISetting
{
/**
* @return string Lowercase a-z and underscore only identifier
* @since 20.0.0
...
...
@@ -78,4 +78,24 @@ abstract class ActivitySettings {
public
function
isDefaultEnabledNotification
()
{
return
$this
->
isDefaultEnabledMail
()
&&
!
$this
->
canChangeMail
();
}
/**
* Left in for backwards compatibility
*
* @return bool
* @since 20.0.0
*/
public
function
canChangeStream
()
{
return
false
;
}
/**
* Left in for backwards compatibility
*
* @return bool
* @since 20.0.0
*/
public
function
isDefaultEnabledStream
()
{
return
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