From b8838a5bdaf047679ee4dce2a89e2298e54513a0 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 26 Sep 2011 15:24:48 -0400 Subject: [PATCH] CC-2833: Use ClassLoaders for PHP Files -autoload AtSoundcloud class --- airtime_mvc/application/Bootstrap.php | 4 ++-- airtime_mvc/application/controllers/ApiController.php | 2 +- airtime_mvc/application/models/Soundcloud.php | 2 +- airtime_mvc/application/models/StoredFile.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/application/Bootstrap.php b/airtime_mvc/application/Bootstrap.php index f3f956da5..9da2f81e9 100644 --- a/airtime_mvc/application/Bootstrap.php +++ b/airtime_mvc/application/Bootstrap.php @@ -11,12 +11,12 @@ require_once __DIR__."/configs/constants.php"; require_once __DIR__."/configs/conf.php"; require_once 'DB.php'; -require_once 'Soundcloud.php'; +//require_once 'Soundcloud.php'; //require_once 'MusicDir.php'; //require_once 'Playlist.php'; //require_once 'StoredFile.php'; //require_once 'Schedule.php'; -require_once 'Preference.php'; +//require_once 'Preference.php'; //require_once 'Shows.php'; //require_once 'User.php'; //require_once 'RabbitMq.php'; diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 7e6b5768f..8e0fc20f7 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -400,7 +400,7 @@ class ApiController extends Zend_Controller_Action $tags = array_merge($hosts, array($show_name)); try { - $soundcloud = new ATSoundcloud(); + $soundcloud = new Application_Model_AtSoundcloud(); $soundcloud_id = $soundcloud->uploadTrack($file->getFilePath(), $tmpTitle, $description, $tags, $show_start_time, $show_genre); $file->setSoundCloudFileId($soundcloud_id); break; diff --git a/airtime_mvc/application/models/Soundcloud.php b/airtime_mvc/application/models/Soundcloud.php index 5e17049b6..29ad98772 100644 --- a/airtime_mvc/application/models/Soundcloud.php +++ b/airtime_mvc/application/models/Soundcloud.php @@ -2,7 +2,7 @@ require_once 'soundcloud-api/Services/Soundcloud.php'; -class ATSoundcloud { +class Application_Model_AtSoundcloud { private $_soundcloud; diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index a9f0913d7..6c9bf6e16 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -924,7 +924,7 @@ class Application_Model_StoredFile { $release = $file->getDbYear(); try { - $soundcloud = new ATSoundcloud(); + $soundcloud = new Application_Model_AtSoundcloud(); $soundcloud_id = $soundcloud->uploadTrack($this->getFilePath(), $this->getName(), $description, $tag, $release, $genre); $this->setSoundCloudFileId($soundcloud_id); break;