From 6a72037c41d7f18b9f20b3b8af88dd725ab523e3 Mon Sep 17 00:00:00 2001 From: "paul.baranowski" Date: Thu, 24 Mar 2011 11:52:44 -0400 Subject: [PATCH 1/4] Added migration to drop tables we dont use anymore. --- .../Version20110312121200.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 install/DoctrineMigrations/Version20110312121200.php diff --git a/install/DoctrineMigrations/Version20110312121200.php b/install/DoctrineMigrations/Version20110312121200.php new file mode 100644 index 000000000..8bf20d856 --- /dev/null +++ b/install/DoctrineMigrations/Version20110312121200.php @@ -0,0 +1,19 @@ +dropTable("cc_backup"); + $schema->dropTable("cc_trans"); + } + + public function down(Schema $schema) + { + } +} From 7684fedb50ac45e8334de8cf90ec3ab1cfc4aadf Mon Sep 17 00:00:00 2001 From: "paul.baranowski" Date: Thu, 24 Mar 2011 14:55:42 -0400 Subject: [PATCH 2/4] Fixed bug on uninstall where it would complain about removing files that didnt exist, and also would stop the uninstallation if it couldnt connect to the database. --- install/airtime-uninstall.php | 2 +- install/installInit.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/install/airtime-uninstall.php b/install/airtime-uninstall.php index fa81129cb..5b9a58c3a 100644 --- a/install/airtime-uninstall.php +++ b/install/airtime-uninstall.php @@ -39,7 +39,7 @@ $command = "sudo -u postgres dropdb {$CC_CONFIG['dsn']['database']} 2> /dev/null //------------------------------------------------------------------------ if ($dbDeleteFailed) { echo " * Couldn't delete the database, so deleting all the DB tables...".PHP_EOL; - AirtimeInstall::DbConnect(true); + AirtimeInstall::DbConnect(false); if (!PEAR::isError($CC_DBC)) { $sql = "select * from pg_tables where tableowner = 'airtime'"; diff --git a/install/installInit.php b/install/installInit.php index ffad0ac29..84fe04b81 100644 --- a/install/installInit.php +++ b/install/installInit.php @@ -112,7 +112,7 @@ class AirtimeInstall { public static function SetupStorageDirectory($CC_CONFIG) { global $CC_CONFIG, $CC_DBC; - + echo PHP_EOL."*** Directory Setup ***".PHP_EOL; foreach (array('baseFilesDir', 'storageDir') as $d) { if ( !file_exists($CC_CONFIG[$d]) ) { @@ -141,7 +141,7 @@ class AirtimeInstall { // Create the database user $command = "sudo -u postgres psql postgres --command \"CREATE USER {$CC_CONFIG['dsn']['username']} " ." ENCRYPTED PASSWORD '{$CC_CONFIG['dsn']['password']}' LOGIN CREATEDB NOCREATEUSER;\" 2>/dev/null"; - + @exec($command, $output, $results); if ($results == 0) { echo "* User {$CC_CONFIG['dsn']['username']} created.".PHP_EOL; @@ -153,7 +153,7 @@ class AirtimeInstall { public static function CreateDatabase() { global $CC_CONFIG; - + $command = "sudo -u postgres createdb {$CC_CONFIG['dsn']['database']} --owner {$CC_CONFIG['dsn']['username']} 2> /dev/null"; @exec($command, $output, $results); if ($results == 0) { @@ -205,7 +205,7 @@ class AirtimeInstall { public static function CreateSymlinks(){ AirtimeInstall::RemoveSymlinks(); - + $dir = realpath(__DIR__."/../utils/airtime-import"); exec("ln -s $dir /usr/bin/airtime-import"); @@ -214,8 +214,8 @@ class AirtimeInstall { } public static function RemoveSymlinks(){ - exec("rm /usr/bin/airtime-import"); - exec("rm /usr/bin/airtime-clean-storage"); + exec("rm -f /usr/bin/airtime-import"); + exec("rm -f /usr/bin/airtime-clean-storage"); } From 38e84b81db716f7cd2233bece2568213b3537abd Mon Sep 17 00:00:00 2001 From: "paul.baranowski" Date: Thu, 24 Mar 2011 15:05:49 -0400 Subject: [PATCH 3/4] CC-2047: Add Audio menu could be labeled Add Media Changed. --- application/configs/navigation.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/configs/navigation.php b/application/configs/navigation.php index d696cc4b5..3c4f758f2 100644 --- a/application/configs/navigation.php +++ b/application/configs/navigation.php @@ -2,7 +2,7 @@ /* * Navigation container (config/array) - + * Each element in the array will be passed to * Zend_Navigation_Page::factory() when constructing * the navigation container below. @@ -16,7 +16,7 @@ $pages = array( 'resource' => 'nowplaying' ), array( - 'label' => 'Add Audio', + 'label' => 'Add Media', 'module' => 'default', 'controller' => 'Plupload', 'action' => 'plupload', @@ -51,7 +51,7 @@ $pages = array( 'module' => 'default', 'controller' => 'user', 'action' => 'add-user', - 'resource' => 'user' + 'resource' => 'user' ) ) ), @@ -64,10 +64,10 @@ $pages = array( ) ); - + // Create container from array $container = new Zend_Navigation($pages); $container->id = "nav"; - + //store it in the registry: Zend_Registry::set('Zend_Navigation', $container); From bdf98c9ec8a22eca3edf2e69da0d1837d5429f7c Mon Sep 17 00:00:00 2001 From: "paul.baranowski" Date: Thu, 24 Mar 2011 15:08:58 -0400 Subject: [PATCH 4/4] CC-2035: Context menu says 'Add Content' when it should say 'Add/Remove Content' Changed. --- application/controllers/ScheduleController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/ScheduleController.php b/application/controllers/ScheduleController.php index daf774517..acbc7bc60 100644 --- a/application/controllers/ScheduleController.php +++ b/application/controllers/ScheduleController.php @@ -161,7 +161,7 @@ class ScheduleController extends Zend_Controller_Action if (($user->isHost($show->getShowId()) || $user->isAdmin()) && !$show->isRecorded() && !$show->isRebroadcast()) { $menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/schedule-show-dialog'.$params, - 'callback' => 'window["buildScheduleDialog"]'), 'title' => 'Add Content'); + 'callback' => 'window["buildScheduleDialog"]'), 'title' => 'Add / Remove Content'); $menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/clear-show'.$params, 'callback' => 'window["scheduleRefetchEvents"]'), 'title' => 'Remove All Content');