From e7797f36cf7fd98c825f497bc7f24015c95e8d22 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 1 May 2012 21:52:03 +0200 Subject: move file link generation from controller to view Signed-off-by: Florian Pritz --- application/models/file_mod.php | 7 +------ application/views/file/html_header.php | 12 ++++++------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/application/models/file_mod.php b/application/models/file_mod.php index 6030aefdd..d91157a33 100644 --- a/application/models/file_mod.php +++ b/application/models/file_mod.php @@ -282,12 +282,7 @@ class File_mod extends CI_Model { } $this->data['title'] = htmlspecialchars($filedata['filename']); - $this->data['raw_link'] = site_url($id); - $this->data['new_link'] = site_url(); - $this->data['plain_link'] = site_url($id.'/plain'); - $this->data['auto_link'] = site_url($id).'/'; - $this->data['rmd_link'] = site_url($id.'/rmd'); - $this->data['delete_link'] = site_url("file/delete/".$id); + $this->data['id'] = $id; header("Content-Type: text/html\n"); diff --git a/application/views/file/html_header.php b/application/views/file/html_header.php index 436f7491d..284844410 100644 --- a/application/views/file/html_header.php +++ b/application/views/file/html_header.php @@ -7,14 +7,14 @@
- New | - Raw | - Plain | + New | + Raw | + ">Plain | Currently: | - Timeout: + Timeout: " title="delete">
- Code | - Render Markdown + ">Code | + ">Render Markdown