Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
5a5bcccd
"README.md" did not exist on "9c4734637348eb82224fe15f17a16b07b858e498"
Commit
5a5bcccd
authored
9 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
Don't show apps which are always enabled in the app manager
parent
6fc59f85
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/private/app.php
+2
-4
2 additions, 4 deletions
lib/private/app.php
lib/private/app/appmanager.php
+12
-5
12 additions, 5 deletions
lib/private/app/appmanager.php
lib/public/app/iappmanager.php
+6
-0
6 additions, 0 deletions
lib/public/app/iappmanager.php
with
20 additions
and
9 deletions
lib/private/app.php
+
2
−
4
View file @
5a5bcccd
...
...
@@ -768,12 +768,9 @@ class OC_App {
if
(
$file
[
0
]
!=
'.'
and
is_dir
(
$apps_dir
[
'path'
]
.
'/'
.
$file
)
and
is_file
(
$apps_dir
[
'path'
]
.
'/'
.
$file
.
'/appinfo/info.xml'
))
{
$apps
[]
=
$file
;
}
}
}
}
return
$apps
;
...
...
@@ -793,7 +790,8 @@ class OC_App {
//TODO which apps do we want to blacklist and how do we integrate
// blacklisting with the multi apps folder feature?
$blacklist
=
array
(
'files'
);
//we don't want to show configuration for these
//we don't want to show configuration for these
$blacklist
=
\OC
::
$server
->
getAppManager
()
->
getAlwaysEnabledApps
();
$appList
=
array
();
$l
=
\OC
::
$server
->
getL10N
(
'core'
);
...
...
This diff is collapsed.
Click to expand it.
lib/private/app/appmanager.php
+
12
−
5
View file @
5a5bcccd
...
...
@@ -136,9 +136,6 @@ class AppManager implements IAppManager {
* @return bool
*/
private
function
checkAppForUser
(
$enabled
,
$user
)
{
if
(
$this
->
isAlwaysEnabled
(
$enabled
))
{
return
true
;
}
if
(
$enabled
===
'yes'
)
{
return
true
;
}
elseif
(
is_null
(
$user
))
{
...
...
@@ -284,14 +281,17 @@ class AppManager implements IAppManager {
return
$incompatibleApps
;
}
/**
* @inheritdoc
*/
public
function
isShipped
(
$appId
)
{
$this
->
loadShippedJson
();
return
in_array
(
$appId
,
$this
->
shippedApps
);
}
private
function
isAlwaysEnabled
(
$appId
)
{
$
this
->
loadShippedJson
();
return
in_array
(
$appId
,
$
this
->
alwaysEnabled
);
$
alwaysEnabled
=
$this
->
getAlwaysEnabledApps
();
return
in_array
(
$appId
,
$alwaysEnabled
);
}
private
function
loadShippedJson
()
{
...
...
@@ -310,4 +310,11 @@ class AppManager implements IAppManager {
}
}
/**
* @inheritdoc
*/
public
function
getAlwaysEnabledApps
()
{
$this
->
loadShippedJson
();
return
$this
->
alwaysEnabled
;
}
}
This diff is collapsed.
Click to expand it.
lib/public/app/iappmanager.php
+
6
−
0
View file @
5a5bcccd
...
...
@@ -105,4 +105,10 @@ interface IAppManager {
* @since 9.0.0
*/
public
function
isShipped
(
$appId
);
/**
* @return string[]
* @since 9.0.0
*/
public
function
getAlwaysEnabledApps
();
}
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