|
@@ -110,9 +110,10 @@ class EventElement extends EventPropagator
|
110
|
110
|
$security_context = new SecurityContext($added_by_user);
|
111
|
111
|
if (!$security_context->actionIsAffectedBy(SecurityContext::AFFECT_NO_SCORING, SecurityContext::ACTION_ELEMENT_ADD_TO_FAVORITES))
|
112
|
112
|
{
|
113
|
|
- $ur->addPoints(
|
114
|
|
- $this->container->getParameter('reputation_element_favorite_value')
|
115
|
|
- );
|
|
113
|
+ $score_action = $this->container->getParameter('reputation_element_favorite_value');
|
|
114
|
+ $ur->addPoints($score_action);
|
|
115
|
+ $element->addPoints($score_action);
|
|
116
|
+ $element->increaseCountFavorited();
|
116
|
117
|
}
|
117
|
118
|
|
118
|
119
|
$uea = new UserEventAction($element->getOwner(), $this->container);
|
|
@@ -131,9 +132,10 @@ class EventElement extends EventPropagator
|
131
|
132
|
$security_context = new SecurityContext($removed_by_user);
|
132
|
133
|
if (!$security_context->actionIsAffectedBy(SecurityContext::AFFECT_NO_SCORING, SecurityContext::ACTION_ELEMENT_ADD_TO_FAVORITES))
|
133
|
134
|
{
|
134
|
|
- $ur->removePoints(
|
135
|
|
- $this->container->getParameter('reputation_element_favorite_value')
|
136
|
|
- );
|
|
135
|
+ $score_action = $this->container->getParameter('reputation_element_favorite_value');
|
|
136
|
+ $ur->removePoints($score_action);
|
|
137
|
+ $element->removePoints($score_action);
|
|
138
|
+ $element->uncreaseCountFavorited();
|
137
|
139
|
}
|
138
|
140
|
}
|
139
|
141
|
|