public function renderContent() { if ($this->isEditable()) { list($app, $filename) = explode('/templates/', $this->path, 2); $name = substr($filename, 0, -4); list(, $template) = $this->findTemplate($this->theme, $app, $name, ''); \OC_Response::sendFile($template); } else { throw new SecurityException('Template not editable.', 403); } }
/** * Send file as response, checking and setting caching headers * @param string $filepath of file to send */ public static function sendFile($filepath) { \OC_Response::sendFile($filepath); }