summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/controllers/Main.php1
-rw-r--r--application/views/file/upload_form.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/application/controllers/Main.php b/application/controllers/Main.php
index 9db63b39f..df3e8ad78 100644
--- a/application/controllers/Main.php
+++ b/application/controllers/Main.php
@@ -468,6 +468,7 @@ class Main extends MY_Controller {
if ($filedata !== false) {
$pygments = new \libraries\Pygments($this->mfile->file($filedata["data_id"]), $filedata["mimetype"], $filedata["filename"]);
if ($pygments->can_highlight()) {
+ $this->data["textarea_filename"] = $filedata["filename"];
$this->data["textarea_content"] = file_get_contents($this->mfile->file($filedata["data_id"]));
}
}
diff --git a/application/views/file/upload_form.php b/application/views/file/upload_form.php
index 8f6807373..e2350c09d 100644
--- a/application/views/file/upload_form.php
+++ b/application/views/file/upload_form.php
@@ -14,7 +14,7 @@
<div class="tab-pane active" id="text-upload-tab-1">
<div class="panel panel-default">
<div class="panel-heading">
- <input type="text" name="filename[1]" class="form-control" placeholder="Filename/title (default: stdin)">
+ <input type="text" name="filename[1]" class="form-control" placeholder="Filename/title (default: stdin)" value="<?php if (isset($textarea_filename)) { echo htmlspecialchars($textarea_filename); } ?>">
</div>
<textarea name="content[1]" class="form-control text-upload" placeholder="Paste content"><?php
if (isset($textarea_content)) {