Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
225
Merge Requests
225
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
eb0da10e
Commit
eb0da10e
authored
Aug 21, 2017
by
catch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2902896
by quocnht, joachim: Replace REQUEST_TIME with time service in ChangedItem
parent
a0bb5da1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
core/lib/Drupal/Core/Field/Plugin/Field/FieldType/ChangedItem.php
.../Drupal/Core/Field/Plugin/Field/FieldType/ChangedItem.php
+2
-2
No files found.
core/lib/Drupal/Core/Field/Plugin/Field/FieldType/ChangedItem.php
View file @
eb0da10e
...
...
@@ -30,7 +30,7 @@ public function preSave() {
// Set the timestamp to request time if it is not set.
if
(
!
$this
->
value
)
{
$this
->
value
=
REQUEST_TIME
;
$this
->
value
=
\
Drupal
::
time
()
->
getRequestTime
()
;
}
else
{
// On an existing entity translation, the changed timestamp will only be
...
...
@@ -47,7 +47,7 @@ public function preSave() {
if
(
!
$entity
->
isNew
()
&&
$original
->
hasTranslation
(
$langcode
))
{
$original_value
=
$original
->
getTranslation
(
$langcode
)
->
get
(
$this
->
getFieldDefinition
()
->
getName
())
->
value
;
if
(
$this
->
value
==
$original_value
&&
$entity
->
hasTranslationChanges
())
{
$this
->
value
=
REQUEST_TIME
;
$this
->
value
=
\
Drupal
::
time
()
->
getRequestTime
()
;
}
}
}
...
...
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