Add optional app argument to Horde_Themes::soundList()
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 15 Nov 2010 23:36:31 +0000 (16:36 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 15 Nov 2010 23:41:24 +0000 (16:41 -0700)
framework/Core/lib/Horde/Themes.php

index 4d13a69..28c689f 100644 (file)
@@ -331,13 +331,16 @@ class Horde_Themes
     /**
      * Returns a list of available sounds for a theme.
      *
+     * @param string $app  The app to search in.
+     *
      * @return array  An array of Horde_Themes_Sound objects. Keys are the
      *                base filenames.
      */
-    static public function soundList()
+    static public function soundList($app = null)
     {
-        $app = $GLOBALS['registry']->getApp();
-
+        if (is_null($app)) {
+            $app = $GLOBALS['registry']->getApp();
+        }
         /* Do search in reverse order - app + theme sounds have the highest
          * priority and will overwrite previous sound definitions. */
         $locations = array(