public function removeWatchDirectoryAction()
 {
     $chosen = $this->getRequest()->getParam("dir");
     $dir = MusicDir::removeWatchedDir($chosen);
     $watched_dirs_form = new Application_Form_WatchedDirPreferences();
     $this->view->subform = $watched_dirs_form->render();
 }
示例#2
0
 public function removeWatchedDirAction()
 {
     global $CC_CONFIG;
     $request = $this->getRequest();
     $api_key = $request->getParam('api_key');
     $path = base64_decode($request->getParam('path'));
     if (!in_array($api_key, $CC_CONFIG["apiKey"])) {
         header('HTTP/1.0 401 Unauthorized');
         print 'You are not allowed to access this resource.';
         exit;
     }
     $this->view->msg = MusicDir::removeWatchedDir($path);
 }