Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
378eef7e
Commit
378eef7e
authored
Mar 18, 2015
by
Morris Jobke
Browse files
migrate share helper method to IConfig
parent
f4b6f3cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/private/share/helper.php
View file @
378eef7e
...
@@ -164,14 +164,16 @@ class Helper extends \OC\Share\Constants {
...
@@ -164,14 +164,16 @@ class Helper extends \OC\Share\Constants {
*/
*/
public
static
function
getDefaultExpireSetting
()
{
public
static
function
getDefaultExpireSetting
()
{
$config
=
\
OC
::
$server
->
getConfig
();
$defaultExpireSettings
=
array
(
'defaultExpireDateSet'
=>
false
);
$defaultExpireSettings
=
array
(
'defaultExpireDateSet'
=>
false
);
// get default expire settings
// get default expire settings
$defaultExpireDate
=
\
OC_App
config
::
getValue
(
'core'
,
'shareapi_default_expire_date'
,
'no'
);
$defaultExpireDate
=
$
config
->
get
App
Value
(
'core'
,
'shareapi_default_expire_date'
,
'no'
);
if
(
$defaultExpireDate
===
'yes'
)
{
if
(
$defaultExpireDate
===
'yes'
)
{
$enforceExpireDate
=
\
OC_App
config
::
getValue
(
'core'
,
'shareapi_enforce_expire_date'
,
'no'
);
$enforceExpireDate
=
$
config
->
get
App
Value
(
'core'
,
'shareapi_enforce_expire_date'
,
'no'
);
$defaultExpireSettings
[
'defaultExpireDateSet'
]
=
true
;
$defaultExpireSettings
[
'defaultExpireDateSet'
]
=
true
;
$defaultExpireSettings
[
'expireAfterDays'
]
=
(
int
)
\
OC_App
config
::
getValue
(
'core'
,
'shareapi_expire_after_n_days'
,
'7'
);
$defaultExpireSettings
[
'expireAfterDays'
]
=
(
int
)
(
$
config
->
get
App
Value
(
'core'
,
'shareapi_expire_after_n_days'
,
'7'
)
)
;
$defaultExpireSettings
[
'enforceExpireDate'
]
=
$enforceExpireDate
===
'yes'
?
true
:
false
;
$defaultExpireSettings
[
'enforceExpireDate'
]
=
$enforceExpireDate
===
'yes'
?
true
:
false
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment