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