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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
0a1e5aeb
Commit
0a1e5aeb
authored
10 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
Extend public config interface
parent
73685892
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/private/allconfig.php
+43
-2
43 additions, 2 deletions
lib/private/allconfig.php
lib/public/iconfig.php
+33
-0
33 additions, 0 deletions
lib/public/iconfig.php
with
76 additions
and
2 deletions
lib/private/allconfig.php
+
43
−
2
View file @
0a1e5aeb
...
...
@@ -19,8 +19,8 @@ class AllConfig implements \OCP\IConfig {
* @param string $key the key of the value, under which will be saved
* @param mixed $value the value that should be stored
*/
public
function
setSystemValue
(
$key
,
$value
)
{
\OCP\Config
::
setSystemValue
(
$key
,
$value
);
public
function
setSystemValue
(
$key
,
$value
)
{
\OCP\Config
::
setSystemValue
(
$key
,
$value
);
}
/**
...
...
@@ -34,6 +34,15 @@ class AllConfig implements \OCP\IConfig {
return
\OCP\Config
::
getSystemValue
(
$key
,
$default
);
}
/**
* Delete a system wide defined value
*
* @param string $key the key of the value, under which it was saved
*/
public
function
deleteSystemValue
(
$key
)
{
\OCP\Config
::
deleteSystemValue
(
$key
);
}
/**
* Writes a new app wide value
...
...
@@ -58,6 +67,16 @@ class AllConfig implements \OCP\IConfig {
return
\OCP\Config
::
getAppValue
(
$appName
,
$key
,
$default
);
}
/**
* Delete an app wide defined value
*
* @param string $appName the appName that we stored the value under
* @param string $key the key of the value, under which it was saved
*/
public
function
deleteAppValue
(
$appName
,
$key
)
{
\OC_Appconfig
::
deleteKey
(
$appName
,
$key
);
}
/**
* Set a user defined value
...
...
@@ -83,4 +102,26 @@ class AllConfig implements \OCP\IConfig {
public
function
getUserValue
(
$userId
,
$appName
,
$key
,
$default
=
''
)
{
return
\OCP\Config
::
getUserValue
(
$userId
,
$appName
,
$key
,
$default
);
}
/**
* Get the keys of all stored by an app for the user
*
* @param string $userId the userId of the user that we want to store the value under
* @param string $appName the appName that we stored the value under
* @return string[]
*/
public
function
getUserKeys
(
$userId
,
$appName
)
{
return
\OC_Preferences
::
getKeys
(
$userId
,
$appName
);
}
/**
* Delete a user value
*
* @param string $userId the userId of the user that we want to store the value under
* @param string $appName the appName that we stored the value under
* @param string $key the key under which the value is being stored
*/
public
function
deleteUserValue
(
$userId
,
$appName
,
$key
)
{
\OC_Preferences
::
deleteKey
(
$userId
,
$appName
,
$key
);
}
}
This diff is collapsed.
Click to expand it.
lib/public/iconfig.php
+
33
−
0
View file @
0a1e5aeb
...
...
@@ -51,6 +51,13 @@ interface IConfig {
*/
public
function
getSystemValue
(
$key
,
$default
=
''
);
/**
* Delete a system wide defined value
*
* @param string $key the key of the value, under which it was saved
*/
public
function
deleteSystemValue
(
$key
);
/**
* Writes a new app wide value
...
...
@@ -72,6 +79,14 @@ interface IConfig {
*/
public
function
getAppValue
(
$appName
,
$key
,
$default
=
''
);
/**
* Delete an app wide defined value
*
* @param string $appName the appName that we stored the value under
* @param string $key the key of the value, under which it was saved
*/
public
function
deleteAppValue
(
$appName
,
$key
);
/**
* Set a user defined value
...
...
@@ -94,4 +109,22 @@ interface IConfig {
* @return string
*/
public
function
getUserValue
(
$userId
,
$appName
,
$key
,
$default
=
''
);
/**
* Get the keys of all stored by an app for the user
*
* @param string $userId the userId of the user that we want to store the value under
* @param string $appName the appName that we stored the value under
* @return string[]
*/
public
function
getUserKeys
(
$userId
,
$appName
);
/**
* Delete a user value
*
* @param string $userId the userId of the user that we want to store the value under
* @param string $appName the appName that we stored the value under
* @param string $key the key under which the value is being stored
*/
public
function
deleteUserValue
(
$userId
,
$appName
,
$key
);
}
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