summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-06-09 00:01:13 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-06-09 00:01:13 +0200
commit51ebe79aa0fc50df691f442a73e3ac34a08179a0 (patch)
tree8615bfe4869764507ca0106465df1ca0003fcfd3 /application/controllers
parentee6706a4ab8207fc2c007fc2069505b24873e780 (diff)
implement repasting (fills textarea with ID's content)
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/file.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index cb95edf0c..1c216aa15 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -353,6 +353,16 @@ class File extends CI_Controller {
$this->data['username'] = $this->muser->get_username();
+ $repaste_id = $this->input->get("repaste");
+
+ if ($repaste_id) {
+ $filedata = $this->mfile->get_filedata($repaste_id);
+
+ if ($filedata !== false && $this->mfile->can_highlight($filedata["mimetype"])) {
+ $this->data["textarea_content"] = file_get_contents($this->mfile->file($filedata["hash"]));
+ }
+ }
+
$this->load->view('header', $this->data);
$this->load->view($this->var->view_dir.'/upload_form', $this->data);
if (is_cli_client()) {