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