Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
242
Issues
242
List
Boards
Labels
Service Desk
Milestones
Merge Requests
31
Merge Requests
31
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
a60771f1
Commit
a60771f1
authored
2 minutes ago
by
Guy Thouret
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fix) Cast values to integers in Feeds PropogateProperties delegate -
#616
parent
0032c435
chore/616-propogate-props
1 merge request
!303
Propogate Properties when entities get updated
Pipeline
#79255879
running with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
PropagateProperties.php
Core/Feeds/Delegates/PropagateProperties.php
+8
-8
No files found.
Core/Feeds/Delegates/PropagateProperties.php
View file @
a60771f1
...
...
@@ -9,12 +9,12 @@ class PropagateProperties extends Properties
{
public
function
toActivity
(
$from
,
Activity
$to
)
:
Activity
{
if
(
$this
->
valueHasChanged
(
$from
->
getModeratorGuid
(),
$to
->
getModeratorGuid
()))
{
$to
->
setModeratorGuid
(
$from
->
getModeratorGuid
());
if
(
$this
->
valueHasChanged
(
(
int
)
$from
->
getModeratorGuid
(),
(
int
)
$to
->
getModeratorGuid
()))
{
$to
->
setModeratorGuid
(
(
int
)
$from
->
getModeratorGuid
());
}
if
(
$this
->
valueHasChanged
(
$from
->
getTimeModerated
(),
$to
->
getTimeModerated
()))
{
$to
->
setTimeModerated
(
$from
->
getTimeModerated
());
if
(
$this
->
valueHasChanged
(
(
int
)
$from
->
getTimeModerated
(),
(
int
)
$to
->
getTimeModerated
()))
{
$to
->
setTimeModerated
(
(
int
)
$from
->
getTimeModerated
());
}
return
$to
;
...
...
@@ -22,12 +22,12 @@ class PropagateProperties extends Properties
public
function
fromActivity
(
Activity
$from
,
$to
)
{
if
(
$this
->
valueHasChanged
(
$from
->
getModeratorGuid
(),
$to
->
getModeratorGuid
()))
{
$to
->
setModeratorGuid
(
$from
->
getModeratorGuid
());
if
(
$this
->
valueHasChanged
(
(
int
)
$from
->
getModeratorGuid
(),
(
int
)
$to
->
getModeratorGuid
()))
{
$to
->
setModeratorGuid
(
(
int
)
$from
->
getModeratorGuid
());
}
if
(
$this
->
valueHasChanged
(
$from
->
getTimeModerated
(),
$to
->
getTimeModerated
()))
{
$to
->
setTimeModerated
(
$from
->
getTimeModerated
());
if
(
$this
->
valueHasChanged
(
(
int
)
$from
->
getTimeModerated
(),
(
int
)
$to
->
getTimeModerated
()))
{
$to
->
setTimeModerated
(
(
int
)
$from
->
getTimeModerated
());
}
return
$to
;
...
...
This diff is collapsed.
Click to expand it.
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