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';
|
||||
|
Reference in New Issue
Block a user