Skip to content

Commit 2300670

Browse files
committed
Removed unused methods
1 parent e7af510 commit 2300670

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

admin/controller/editor/code.php

+2-25
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,8 @@ function save() {
101101
}
102102
}
103103

104-
header('Content-type: application/json; charset=utf-8');
105-
echo json_encode($message);
106-
107-
die();
104+
$this->response->setType('json');
105+
$this->response->output($message);
108106
}
109107

110108
function loadFile() {
@@ -123,27 +121,6 @@ function loadFile() {
123121
die("Error loading: $file");
124122
}
125123

126-
function upload() {
127-
$type = $this->request->post['type'];
128-
$path = sanitizeFileName($this->request->post['mediaPath']);
129-
$file = sanitizeFileName($this->request->files['file']['name']);
130-
$path = str_replace('/media', '', $path);
131-
132-
$destination = DIR_MEDIA . $path . '/' . $file;
133-
134-
if (move_uploaded_file($this->request->files['file']['tmp_name'], $destination)) {
135-
if (isset($this->request->post['onlyFilename'])) {
136-
echo $file;
137-
} else {
138-
echo $destination;
139-
}
140-
} else {
141-
echo __('Error uploading file!');
142-
}
143-
144-
die();
145-
}
146-
147124
function scan() {
148125
$type = $this->request->get['type'] ?? 'public';
149126
$scandir = $this->dirForType($type);

0 commit comments

Comments
 (0)