From 7462e952e97b609111fe542795d32ca0bf045ebb Mon Sep 17 00:00:00 2001 From: themohooks <81331307+themohooks@users.noreply.github.com> Date: Sat, 14 Sep 2024 22:57:33 +0300 Subject: [PATCH] fixes --- app/Core/Routes.php | 2 +- app/Services/Upload.php | 2 +- views/components/AdminSidebar.php | 4 ++++ views/pages/Admin/Entities.php | 0 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 views/pages/Admin/Entities.php diff --git a/app/Core/Routes.php b/app/Core/Routes.php index e37c9cb..9114c94 100644 --- a/app/Core/Routes.php +++ b/app/Core/Routes.php @@ -28,6 +28,7 @@ class Routes Router::get('/update', 'MainController@update'); Router::get('/top30', 'MainController@top30'); Router::get('/photoext', 'PhotoController@photoext'); + Router::get('/api/photo/compress', 'ApiController@photocompress'); @@ -47,7 +48,6 @@ class Routes Router::post('/api/profile/update', 'ApiController@updateprofile'); Router::post('/api/photo/comment', 'ApiController@photocomment'); Router::get('/api/subscribe', 'ApiController@subscribeuser'); - Router::get('/api/photo/compress', 'ApiController@photocompress'); Router::post('/api/photo/getcomments/$id', 'ApiController@photocommentload'); Router::get('/api/photo/vote', 'ApiController@photovote'); Router::get('/api/photo/checkall', 'ApiController@checkallphotos'); diff --git a/app/Services/Upload.php b/app/Services/Upload.php index d0c6bd7..8a703f8 100644 --- a/app/Services/Upload.php +++ b/app/Services/Upload.php @@ -36,7 +36,7 @@ class Upload $fileext = pathinfo($file, PATHINFO_EXTENSION); } $cstrong = True; - $filecdn = bin2hex(openssl_random_pseudo_bytes(64, $cstrong)) . '.' . $fileext; + $filecdn = bin2hex(openssl_random_pseudo_bytes(64, $cstrong)) . '.' . $fileext['extension']; $folder = $location . $filecdn; if (strtolower (NGALLERY['root']['storage']['type']) == "s3") diff --git a/views/components/AdminSidebar.php b/views/components/AdminSidebar.php index 2865f54..8084539 100644 --- a/views/components/AdminSidebar.php +++ b/views/components/AdminSidebar.php @@ -62,6 +62,10 @@ body { Новости сайта + + + Сущности + diff --git a/views/pages/Admin/Entities.php b/views/pages/Admin/Entities.php new file mode 100644 index 0000000..e69de29