From: Michael M Slusarz Date: Wed, 24 Nov 2010 15:50:44 +0000 (-0700) Subject: Make sure sound file is a wav file X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4259051dbbc0b540896b785b68e4a0af6772f723;p=horde.git Make sure sound file is a wav file --- diff --git a/framework/Core/lib/Horde/Themes/Sound.php b/framework/Core/lib/Horde/Themes/Sound.php index b67df3fc9..a51ac028b 100644 --- a/framework/Core/lib/Horde/Themes/Sound.php +++ b/framework/Core/lib/Horde/Themes/Sound.php @@ -15,10 +15,17 @@ class Horde_Themes_Sound extends Horde_Themes_Element { /** - * The default directory name for this element type. - * - * @var string */ protected $_dirname = 'sounds'; + /** + */ + public function __get($name) + { + /* Sounds must be in .wav format. */ + return (substr(strrchr($name, '.'), 1) == 'wav') + ? parent::__get($name) + : null; + } + }