CC-2833: Use ClassLoaders for PHP Files

-made MusicDir, Playlist and StoredFile autoload
This commit is contained in:
martin 2011-09-22 12:24:17 -04:00
parent 4e79a88adc
commit 2be0960ed5
22 changed files with 124 additions and 551 deletions

View file

@ -240,7 +240,7 @@ class PreferenceController extends Zend_Controller_Action
$element = $this->getRequest()->getParam("element");
$watched_dirs_form = new Application_Form_WatchedDirPreferences();
$res = MusicDir::setStorDir($chosen);
$res = Application_Model_MusicDir::setStorDir($chosen);
if($res['code'] != 0){
$watched_dirs_form->populate(array('storageFolder' => $chosen));
$watched_dirs_form->getElement($element)->setErrors(array($res['error']));
@ -255,7 +255,7 @@ class PreferenceController extends Zend_Controller_Action
$element = $this->getRequest()->getParam("element");
$watched_dirs_form = new Application_Form_WatchedDirPreferences();
$res = MusicDir::addWatchedDir($chosen);
$res = Application_Model_MusicDir::addWatchedDir($chosen);
if($res['code'] != 0){
$watched_dirs_form->populate(array('watchedFolder' => $chosen));
$watched_dirs_form->getElement($element)->setErrors(array($res['error']));
@ -268,7 +268,7 @@ class PreferenceController extends Zend_Controller_Action
{
$chosen = $this->getRequest()->getParam("dir");
$dir = MusicDir::removeWatchedDir($chosen);
$dir = Application_Model_MusicDir::removeWatchedDir($chosen);
$watched_dirs_form = new Application_Form_WatchedDirPreferences();
$this->view->subform = $watched_dirs_form->render();