Make sure sound file is a wav file
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 24 Nov 2010 15:50:44 +0000 (08:50 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 24 Nov 2010 15:58:38 +0000 (08:58 -0700)
framework/Core/lib/Horde/Themes/Sound.php

index b67df3f..a51ac02 100644 (file)
 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;
+    }
+
 }