1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10:
11: class Chora_Renderer_File_Html extends Chora_Renderer_File
12: {
13: public function render()
14: {
15:
16: $checkOut = $GLOBALS['VC']->checkout($this->_file->getPath(), $this->_revision);
17:
18:
19: if ($this->_file->mimeType == 'application/octet-stream') {
20: $this->_view->mimeType = 'text/plain';
21: } else {
22: $this->_view->mimeType = $this->_file->mimeType;
23: }
24:
25: $this->_view->title = $this->_file->getFileName();
26: $this->_view->pretty = Chora::pretty($this->_view->mimeType, $checkOut);
27: if ($this->_view->mimeType == 'text/html') {
28: $this->_view->pretty->setConfigParam('inline', true);
29: }
30:
31: return $this->_view->render('app/views/file/html.html.php');
32: }
33: }
34: