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
65903a01
Commit
65903a01
authored
10 years ago
by
Thomas Müller
Browse files
Options
Downloads
Plain Diff
Merge pull request #10025 from owncloud/l10n-typo
typo fix from transifex suggestion
parents
5a2952e2
7a07690b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/private/share/share.php
+8
-8
8 additions, 8 deletions
lib/private/share/share.php
with
8 additions
and
8 deletions
lib/private/share/share.php
+
8
−
8
View file @
65903a01
...
...
@@ -926,7 +926,7 @@ class Share extends \OC\Share\Constants {
}
/**
* validate expir
e
date if it meets all constraints
* validate expir
ation
date if it meets all constraints
*
* @param string $expireDate well formate date string, e.g. "DD-MM-YYYY"
* @param string $shareTime timestamp when the file was shared
...
...
@@ -956,16 +956,16 @@ class Share extends \OC\Share\Constants {
$maxDays
=
\OCP\Config
::
getAppValue
(
'core'
,
'shareapi_expire_after_n_days'
,
'7'
);
$maxDate
->
add
(
new
\DateInterval
(
'P'
.
$maxDays
.
'D'
));
if
(
$date
>
$maxDate
)
{
$warning
=
'Can
not set expir
e
date. Shares can
not expire later th
e
n '
.
$maxDays
.
' after they where shared'
;
$warning_t
=
$l
->
t
(
'Can
not set expir
e
date. Shares can
not expire later th
e
n %s after they where shared'
,
array
(
$maxDays
));
$warning
=
'Cannot set expir
ation
date. Shares cannot expire later th
a
n '
.
$maxDays
.
' after they where shared'
;
$warning_t
=
$l
->
t
(
'Cannot set expir
ation
date. Shares cannot expire later th
a
n %s after they where shared'
,
array
(
$maxDays
));
\OCP\Util
::
writeLog
(
'OCP\Share'
,
$warning
,
\OCP\Util
::
WARN
);
throw
new
\Exception
(
$warning_t
);
}
}
if
(
$date
<
$today
)
{
$message
=
'Can
not set expir
e
date. Expir
e
date is in the past'
;
$message_t
=
$l
->
t
(
'Can
not set expir
e
date. Expir
e
date is in the past'
);
$message
=
'Cannot set expir
ation
date. Expir
ation
date is in the past'
;
$message_t
=
$l
->
t
(
'Cannot set expir
ation
date. Expir
ation
date is in the past'
);
\OCP\Util
::
writeLog
(
'OCP\Share'
,
$message
,
\OCP\Util
::
WARN
);
throw
new
\Exception
(
$message_t
);
}
...
...
@@ -1018,10 +1018,10 @@ class Share extends \OC\Share\Constants {
$result
=
false
;
// only use default expir
e
date for link shares
// only use default expir
ation
date for link shares
if
((
int
)
$item
[
'share_type'
]
===
self
::
SHARE_TYPE_LINK
)
{
// calculate expir
e
date
// calculate expir
ation
date
if
(
!
empty
(
$item
[
'expiration'
]))
{
$userDefinedExpire
=
new
\DateTime
(
$item
[
'expiration'
]);
$expires
=
$userDefinedExpire
->
getTimestamp
();
...
...
@@ -1030,7 +1030,7 @@ class Share extends \OC\Share\Constants {
}
// get default expir
e
settings
// get default expir
ation
settings
$defaultSettings
=
Helper
::
getDefaultExpireSetting
();
$expires
=
Helper
::
calculateExpireDate
(
$defaultSettings
,
$item
[
'stime'
],
$expires
);
...
...
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