summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/models/file_mod.php7
-rw-r--r--application/views/file/html_header.php12
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 @@
</head>
<body>
<div class="top_bar">
- <a class="raw_link no" href="<?php echo $new_link; ?>">New</a> |
- <a class="raw_link no" href="<?php echo $raw_link; ?>">Raw</a> |
- <a class="raw_link no" href="<?php echo $plain_link; ?>">Plain</a> |
+ <a class="raw_link no" href="<?php echo site_url(); ?>">New</a> |
+ <a class="raw_link no" href="<?php echo site_url($id); ?>">Raw</a> |
+ <a class="raw_link no" href="<?php echo site_url($id."/plain"); ?>">Plain</a> |
Currently: <?php echo $current_highlight; ?> |
- Timeout: <a class="raw_link no" href="<?php echo $delete_link; ?>" title="delete"><?php echo $timeout; ?></a>
+ Timeout: <a class="raw_link no" href="<?php echo site_url("file/delete/".$id); ?>" title="delete"><?php echo $timeout; ?></a>
<div style="float:right;">
- <a class="raw_link no" href="<?php echo $auto_link; ?>">Code</a> |
- <a class="raw_link no" href="<?php echo $rmd_link; ?>">Render Markdown</a>
+ <a class="raw_link no" href="<?php echo site_url($id)."/"; ?>">Code</a> |
+ <a class="raw_link no" href="<?php echo site_url($id."/rmd"); ?>">Render Markdown</a>
</div>
</div>
<script type="text/javascript">