Skip to content
Commits on Source (4)
...@@ -38,10 +38,10 @@ class media implements Interfaces\Api, Interfaces\ApiIgnorePam ...@@ -38,10 +38,10 @@ class media implements Interfaces\Api, Interfaces\ApiIgnorePam
switch ($entity->subtype) { switch ($entity->subtype) {
case "video": case "video":
Helpers\Counters::increment($pages[0], 'plays'); // Helpers\Counters::increment($pages[0], 'plays');
if (isset($pages[1]) && $pages[1] == 'play') { if (isset($pages[1]) && $pages[1] == 'play') {
http_response_code(301); http_response_code(302);
if ($entity->subtype == 'audio') { if ($entity->subtype == 'audio') {
\forward($entity->getSourceUrl('128.mp3')); \forward($entity->getSourceUrl('128.mp3'));
......
...@@ -97,7 +97,7 @@ class PropagateProperties ...@@ -97,7 +97,7 @@ class PropagateProperties
{ {
$this->changed = false; $this->changed = false;
$attachment = $this->entitiesBuilder->single($activity->get('entity_guid')); $attachment = $this->entitiesBuilder->single($activity->get('entity_guid'));
if ($attachment === false) { if (empty($attachment)) {
return; return;
} }
......
...@@ -55,7 +55,15 @@ abstract class Properties ...@@ -55,7 +55,15 @@ abstract class Properties
} }
if ($this->actsOnType === [] || in_array($entity->getType(), $this->actsOnType, true)) { if ($this->actsOnType === [] || in_array($entity->getType(), $this->actsOnType, true)) {
return $this->actsOnSubtype === [] || in_array($entity->getSubtype(), $this->actsOnSubtype, true); if ($this->actsOnSubtype === []) {
return true;
}
if (!is_callable([$entity, 'getSubtype'], true)) {
return false;
}
return in_array($entity->getSubtype(), $this->actsOnSubtype, true);
} }
return false; return false;
......