public function listAllFilesAction() { global $CC_CONFIG; $request = $this->getRequest(); $api_key = $request->getParam('api_key'); if (!in_array($api_key, $CC_CONFIG["apiKey"])) { header('HTTP/1.0 401 Unauthorized'); print 'You are not allowed to access this resource.'; exit; } $dir_id = $request->getParam('dir_id'); $this->view->files = StoredFile::listAllFiles($dir_id); }