public function themeDownloadAction() { $theme_id = waRequest::get('theme'); $theme = new waTheme($theme_id, $this->getAppId()); $this->logAction('theme_download', $theme_id); $target_file = $theme->compress(wa()->getTempPath("themes")); waFiles::readFile($target_file, basename($target_file), false); waFiles::delete($target_file); $this->displayJson(array()); }