Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
server
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
GitHub Mirror
Nextcloud
server
Commits
4673b54a
Unverified
Commit
4673b54a
authored
Mar 5, 2021
by
Julius Härtl
Browse files
Options
Downloads
Patches
Plain Diff
Add dedicated product name to OCP\Defaults
Signed-off-by:
Julius Härtl
<
jus@bitgrid.net
>
parent
51add75e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/theming/lib/ThemingDefaults.php
+7
-0
7 additions, 0 deletions
apps/theming/lib/ThemingDefaults.php
lib/public/Defaults.php
+11
-1
11 additions, 1 deletion
lib/public/Defaults.php
with
18 additions
and
1 deletion
apps/theming/lib/ThemingDefaults.php
+
7
−
0
View file @
4673b54a
...
@@ -75,6 +75,8 @@ class ThemingDefaults extends \OC_Defaults {
...
@@ -75,6 +75,8 @@ class ThemingDefaults extends \OC_Defaults {
/** @var string */
/** @var string */
private
$entity
;
private
$entity
;
/** @var string */
/** @var string */
private
$productName
;
/** @var string */
private
$url
;
private
$url
;
/** @var string */
/** @var string */
private
$color
;
private
$color
;
...
@@ -119,6 +121,7 @@ class ThemingDefaults extends \OC_Defaults {
...
@@ -119,6 +121,7 @@ class ThemingDefaults extends \OC_Defaults {
$this
->
name
=
parent
::
getName
();
$this
->
name
=
parent
::
getName
();
$this
->
title
=
parent
::
getTitle
();
$this
->
title
=
parent
::
getTitle
();
$this
->
entity
=
parent
::
getEntity
();
$this
->
entity
=
parent
::
getEntity
();
$this
->
productName
=
parent
::
getName
();
$this
->
url
=
parent
::
getBaseUrl
();
$this
->
url
=
parent
::
getBaseUrl
();
$this
->
color
=
parent
::
getColorPrimary
();
$this
->
color
=
parent
::
getColorPrimary
();
$this
->
iTunesAppId
=
parent
::
getiTunesAppId
();
$this
->
iTunesAppId
=
parent
::
getiTunesAppId
();
...
@@ -142,6 +145,10 @@ class ThemingDefaults extends \OC_Defaults {
...
@@ -142,6 +145,10 @@ class ThemingDefaults extends \OC_Defaults {
return
strip_tags
(
$this
->
config
->
getAppValue
(
'theming'
,
'name'
,
$this
->
entity
));
return
strip_tags
(
$this
->
config
->
getAppValue
(
'theming'
,
'name'
,
$this
->
entity
));
}
}
public
function
getProductName
()
{
return
strip_tags
(
$this
->
config
->
getAppValue
(
'theming'
,
'productName'
,
$this
->
productName
));
}
public
function
getBaseUrl
()
{
public
function
getBaseUrl
()
{
return
$this
->
config
->
getAppValue
(
'theming'
,
'url'
,
$this
->
url
);
return
$this
->
config
->
getAppValue
(
'theming'
,
'url'
,
$this
->
url
);
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/public/Defaults.php
+
11
−
1
View file @
4673b54a
...
@@ -104,7 +104,7 @@ class Defaults {
...
@@ -104,7 +104,7 @@ class Defaults {
}
}
/**
/**
* name of your
ownC
loud instance
* name of your
Nextc
loud instance
(e.g. MyPrivateCloud)
* @return string
* @return string
* @since 6.0.0
* @since 6.0.0
*/
*/
...
@@ -112,6 +112,16 @@ class Defaults {
...
@@ -112,6 +112,16 @@ class Defaults {
return
$this
->
defaults
->
getName
();
return
$this
->
defaults
->
getName
();
}
}
/**
* Name of the software product (defaults to Nextcloud)
*
* @return string
* @since 22.0.0
*/
public
function
getProductName
():
string
{
return
$this
->
defaults
->
getProductName
();
}
/**
/**
* name of your ownCloud instance containing HTML styles
* name of your ownCloud instance containing HTML styles
* @return string
* @return string
...
...
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
sign in
to comment