From 71bee30f3e67b43058600dc09c8d5fa977b32e65 Mon Sep 17 00:00:00 2001
From: Florian Pritz
Date: Wed, 4 Apr 2012 13:43:25 +0200
Subject: Disable paste box
Signed-off-by: Florian Pritz
---
application/controllers/file.php | 3 +-
application/views/file/upload_form.php | 40 +++++++++++----------
data/js/upload_form.js | 64 ----------------------------------
3 files changed, 22 insertions(+), 85 deletions(-)
delete mode 100644 data/js/upload_form.js
diff --git a/application/controllers/file.php b/application/controllers/file.php
index edf7e0315..44f691dec 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -200,8 +200,7 @@ class File extends CI_Controller {
$data = array();
if ($this->uri->segment(3)) {
- $this->var->cli_client = true;
- $this->var->view_dir = "file_plaintext";
+ exit;
}
$extension = $this->input->post('extension');
diff --git a/application/views/file/upload_form.php b/application/views/file/upload_form.php
index 9b2115cb0..01fbc5ffa 100644
--- a/application/views/file/upload_form.php
+++ b/application/views/file/upload_form.php
@@ -8,33 +8,35 @@
-
-Uploads/pastes are deleted after days 0): ?>
+
Uploads are deleted after days 0): ?>
unless they are smaller than
. Maximum upload size is
Features
-For shell uploading/pasting and download information for the client go to ">
+For shell uploading and download information for the client go to ">
You can use the to find old uploads using the password supplied when creating the upload.
-How to link your pastes:
+How to link your uploads:
- - /<ID>/ automatically highlight the paste
+ - /<ID>/ automatically highlight the uploads
- /<ID> set the detected MIME type and let the browser do the rest
- /<ID>/plain force the MIME type to be text/plain
- /<ID>/<file extension> override auto detection and use the supplied file extension or language name for highlighting
diff --git a/data/js/upload_form.js b/data/js/upload_form.js
deleted file mode 100644
index 598d86465..000000000
--- a/data/js/upload_form.js
+++ /dev/null
@@ -1,64 +0,0 @@
-// check file size before uploading if browser support html5
-if (window.File && window.FileList) {
- function checkFileUpload(evt) {
- var f = evt.target.files[0];
- if (f.size > max_upload_size) {
- document.getElementById('upload_button').value = "File too big";
- document.getElementById('upload_button').disabled = true;
- } else {
- document.getElementById('upload_button').value = "Upload";
- document.getElementById('upload_button').disabled = false;
- }
- }
-
- document.getElementById('file').addEventListener('change', checkFileUpload, false);
-}
-
-function encode64(inp){
- var key="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
- var chr1,chr2,chr3,enc3,enc4,i=0,out="";
- while(i127) chr1=88;
- chr2=inp.charCodeAt(i++);if(chr2>127) chr2=88;
- chr3=inp.charCodeAt(i++);if(chr3>127) chr3=88;
- if(isNaN(chr3)) {enc4=64;chr3=0;} else enc4=chr3&63
- if(isNaN(chr2)) {enc3=64;chr2=0;} else enc3=((chr2<<2)|(chr3>>6))&63
- out+=key.charAt((chr1>>2)&63)+key.charAt(((chr1<<4)|(chr2>>4))&63)+key.charAt(enc3)+key.charAt(enc4);
- }
- return encodeURIComponent(out);
-}
-
-function gen_boundary() {
- var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
- var string_length = 40;
- var randomstring = '';
- for (var i=0; i