Holiday changes ;)
This commit is contained in:
@@ -14,7 +14,7 @@ class File extends MY_Controller
|
||||
if ($title == null) {
|
||||
redirect(base_url());
|
||||
} else {
|
||||
$file = $this->db->query('SELECT name, type, path FROM files WHERE name = ?', [urldecode($title)])->result_array();
|
||||
$file = $this->db->query('SELECT name, type, path, isUserData FROM files WHERE name = ?', [urldecode($title)])->result_array();
|
||||
|
||||
if (!empty($file)) {
|
||||
$file = $file[0];
|
||||
@@ -25,7 +25,7 @@ class File extends MY_Controller
|
||||
header("Content-Disposition: attachment; filename=" . $file['name'] . '.' . explode('/', $file['type'])[1]);
|
||||
}
|
||||
|
||||
$imagePath = 'files/' . (isset($_GET['w']) || isset($_GET['h']) ? 'thumbs/' : '') . $file['name'] . (isset($_GET['w']) ? '_w' . $_GET['w'] : '') . (isset($_GET['h']) ? '_h' . $_GET['h'] : '') . '.' . explode('.', $file['path'])[1];
|
||||
$imagePath = 'files/' . ($file['isUserData'] ? 'userContent/' : '') . (isset($_GET['w']) || isset($_GET['h']) ? 'thumbs/' : '') . $file['name'] . (isset($_GET['w']) ? '_w' . $_GET['w'] : '') . (isset($_GET['h']) ? '_h' . $_GET['h'] : '') . '.' . explode('.', $file['path'])[1];
|
||||
|
||||
if (!file_exists($imagePath)) {
|
||||
$config['image_library'] = 'gd2';
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -32,7 +32,8 @@
|
||||
|
||||
if ($edit) {
|
||||
if ($this->ProjectsModel->checkIfExists($id)) {
|
||||
$content = $this->ProjectsModel->getEntry($id)[0];
|
||||
$content = $this->ProjectsModel->getEntry($id);
|
||||
$content = $this->ProjectsModel->mergeFullTranslationData($content)[0];
|
||||
$projectCategories = $this->ProjectsModel->getEntryCategories($id);
|
||||
} else {
|
||||
redirect(base_url('admin/projects/edit'));
|
||||
@@ -42,7 +43,7 @@
|
||||
$categories = $this->ProjectsModel->getCategories();
|
||||
|
||||
$this->load->view('admin/sidebar', ['title' => 'Projekt erstellen', 'additionalStyles' => ['lib/content-tools/content-tools.min.css', 'project-edit.css']]);
|
||||
$this->load->view('admin/project_edit', ['edit' => -1, 'categories' => $categories, 'content' => $content, 'pCategories' => $projectCategories]);
|
||||
$this->load->view('admin/project_edit', ['edit' => $id === NULL ? -1 : $id, 'categories' => $categories, 'content' => $content, 'pCategories' => $projectCategories]);
|
||||
$this->load->view('admin/footer', ['additionalScripts' => ['lib/content-tools/content-tools.min.js', 'project-edit.js']]);
|
||||
}
|
||||
|
||||
@@ -58,6 +59,12 @@
|
||||
$translations['de']['title'] = $this->input->post('titleDE');
|
||||
$translations['de']['description'] = $this->input->post('headlineDE');
|
||||
$translations['de']['content'] = $this->input->post('contentDE');
|
||||
$translations['en']['title'] = $this->input->post('titleEN');
|
||||
$translations['en']['description'] = $this->input->post('headlineEN');
|
||||
$translations['en']['content'] = $this->input->post('contentEN');
|
||||
$translations['fr']['title'] = $this->input->post('titleFR');
|
||||
$translations['fr']['description'] = $this->input->post('headlineFR');
|
||||
$translations['fr']['content'] = $this->input->post('contentFR');
|
||||
|
||||
$url = $this->input->post('url');
|
||||
|
||||
|
Reference in New Issue
Block a user