From 7ce3082fa2385577958991991494c076800660da Mon Sep 17 00:00:00 2001
From: Duncan Sommerville <duncan.sommerville@gmail.com>
Date: Wed, 15 Jul 2015 11:46:52 -0400
Subject: [PATCH 1/3] Fix upgrade being run from unit tests

---
 airtime_mvc/application/Bootstrap.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/airtime_mvc/application/Bootstrap.php b/airtime_mvc/application/Bootstrap.php
index 4a5157f1e..f16183157 100644
--- a/airtime_mvc/application/Bootstrap.php
+++ b/airtime_mvc/application/Bootstrap.php
@@ -130,9 +130,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
     protected function _initTasks() {
         /* We need to wrap this here so that we aren't checking when we're running the unit test suite
          */
-        $taskManager = TaskManager::getInstance();
-        $taskManager->runTask(AirtimeTask::UPGRADE);  // Run the upgrade on each request (if it needs to be run)
         if (getenv("AIRTIME_UNIT_TEST") != 1) {
+            $taskManager = TaskManager::getInstance();
+            $taskManager->runTask(AirtimeTask::UPGRADE);  // Run the upgrade on each request (if it needs to be run)
             //This will do the upgrade too if it's needed...
             $taskManager->runTasks();
         }

From 27fe32a3b46e368c2a3c27e22c395db92a73c0fc Mon Sep 17 00:00:00 2001
From: Duncan Sommerville <duncan.sommerville@gmail.com>
Date: Wed, 15 Jul 2015 12:58:05 -0400
Subject: [PATCH 2/3] Use mime-type array when checking for acceptable
 extensions

---
 airtime_mvc/application/models/airtime/CcFiles.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/airtime_mvc/application/models/airtime/CcFiles.php b/airtime_mvc/application/models/airtime/CcFiles.php
index c574c9d7c..a53e1ae24 100644
--- a/airtime_mvc/application/models/airtime/CcFiles.php
+++ b/airtime_mvc/application/models/airtime/CcFiles.php
@@ -149,7 +149,7 @@ class CcFiles extends BaseCcFiles {
 
             //Only accept files with a file extension that we support.
             $fileExtension = pathinfo($originalFilename, PATHINFO_EXTENSION);
-            if (!in_array(strtolower($fileExtension), explode(",", "ogg,mp3,oga,flac,wav,m4a,mp4,opus"))) {
+            if (!in_array(strtolower($fileExtension), array_values(FileDataHelper::getAudioMimeTypeArray()))) {
                 throw new Exception("Bad file extension.");
             }
 

From 8276b1762eb8894c3bbf64669b117f52f2373972 Mon Sep 17 00:00:00 2001
From: drigato <denise.rigato@sourcefabric.org>
Date: Wed, 15 Jul 2015 13:47:54 -0400
Subject: [PATCH 3/3] Updated outdated public airtime api setting message on
 preferences page

---
 airtime_mvc/application/forms/GeneralPreferences.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/airtime_mvc/application/forms/GeneralPreferences.php b/airtime_mvc/application/forms/GeneralPreferences.php
index 94230e667..be12ea565 100644
--- a/airtime_mvc/application/forms/GeneralPreferences.php
+++ b/airtime_mvc/application/forms/GeneralPreferences.php
@@ -107,8 +107,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
                                         ));
         $third_party_api->setValue(Application_Model_Preference::GetAllow3rdPartyApi());
         $third_party_api->setDescription(_('Enabling this feature will allow Airtime to provide schedule data
-                                            to external widgets that can be embedded in your website. Enable this
-                                            feature to reveal the embeddable code.'));
+                                            to external widgets that can be embedded in your website.'));
         $third_party_api->setSeparator(' '); //No <br> between radio buttons
         //$third_party_api->addDecorator(new Zend_Form_Decorator_Label(array('tag' => 'dd', 'class' => 'radio-inline-list')));
         $third_party_api->addDecorator('HtmlTag', array('tag' => 'dd',