public static function soundList($app = null, $theme = null)
{
if (is_null($app)) {
$app = $GLOBALS['registry']->getApp();
}
if (is_null($theme)) {
$theme = $GLOBALS['prefs']->getValue('theme');
}
$cache = $GLOBALS['injector']->getInstance('Horde_Core_Factory_ThemesCache')->create($app, $theme);
$sounds = array();
foreach ($cache->build() as $val) {
if (strpos($val, 'sounds/') === 0 && substr(strrchr($val, '.'), 1) == 'wav') {
$sounds[basename($val)] = self::sound(substr($val, 7));
}
}
ksort($sounds);
return $sounds;
}