Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Removed unused methods

givanz23006702d050
diff --git a/admin/controller/editor/code.php b/admin/controller/editor/code.php
index fb2c37e..18e1c8e 100755
--- a/admin/controller/editor/code.php
+++ b/admin/controller/editor/code.php
@@ -101,10 +101,8 @@ class Code extends Base {
}
}
- header('Content-type: application/json; charset=utf-8');
- echo json_encode($message);
-
- die();
+ $this->response->setType('json');
+ $this->response->output($message);
}
function loadFile() {
@@ -123,27 +121,6 @@ class Code extends Base {
die("Error loading: $file");
}
- function upload() {
- $type = $this->request->post['type'];
- $path = sanitizeFileName($this->request->post['mediaPath']);
- $file = sanitizeFileName($this->request->files['file']['name']);
- $path = str_replace('/media', '', $path);
-
- $destination = DIR_MEDIA . $path . '/' . $file;
-
- if (move_uploaded_file($this->request->files['file']['tmp_name'], $destination)) {
- if (isset($this->request->post['onlyFilename'])) {
- echo $file;
- } else {
- echo $destination;
- }
- } else {
- echo __('Error uploading file!');
- }
-
- die();
- }
-
function scan() {
$type = $this->request->get['type'] ?? 'public';
$scandir = $this->dirForType($type);