From 8d520fbae3d795c3a804808aa40cc79b335db3d6 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Wed, 30 Jul 2014 14:16:38 -0700 Subject: [PATCH] Macros - fix audio disabling not actually disabling audio Summary: Fixes T5653. Test Plan: made a macro with sound and it played. changed it to not play and it did not play. changed it back and it played once more. Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T5653 Differential Revision: https://secure.phabricator.com/D10085 --- .../macro/remarkup/PhabricatorRemarkupRuleImageMacro.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/macro/remarkup/PhabricatorRemarkupRuleImageMacro.php b/src/applications/macro/remarkup/PhabricatorRemarkupRuleImageMacro.php index 4a0ddae147..561e6842bf 100644 --- a/src/applications/macro/remarkup/PhabricatorRemarkupRuleImageMacro.php +++ b/src/applications/macro/remarkup/PhabricatorRemarkupRuleImageMacro.php @@ -124,7 +124,9 @@ final class PhabricatorRemarkupRuleImageMacro extends PhutilRemarkupRule { $id = null; $audio = idx($files, $macro->getAudioPHID()); - if ($audio) { + $should_play = ($audio && $macro->getAudioBehavior() != + PhabricatorFileImageMacro::AUDIO_BEHAVIOR_NONE); + if ($should_play) { $id = celerity_generate_unique_node_id(); $loop = null;