diff --git a/.gitignore b/.gitignore index 1650713..08507e6 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ ngallery.yaml ngallery.yaml /views/pages/t.php views/pages/t.php -rules.txt \ No newline at end of file +rules.txt +rules.txt diff --git a/app/Controllers/Api/Admin/Images/SetVisibility.php b/app/Controllers/Api/Admin/Images/SetVisibility.php index 4bc2cfd..30cc3e3 100644 --- a/app/Controllers/Api/Admin/Images/SetVisibility.php +++ b/app/Controllers/Api/Admin/Images/SetVisibility.php @@ -12,7 +12,7 @@ class SetVisibility { public function __construct() { - DB::query('UPDATE photos SET moderated=:mod WHERE id=:id', array(':id'=>$_GET['id'], ':mod'=>$_GET['mod'])); + DB::query('UPDATE photos SET moderated=:mod, timeupload=:time WHERE id=:id', array(':id'=>$_GET['id'], ':mod'=>$_GET['mod'], ':time'=>time())); header('Location: ' . $_SERVER['HTTP_REFERER']); } } \ No newline at end of file diff --git a/app/Core/Routes.php b/app/Core/Routes.php index 6573208..8e283a5 100644 --- a/app/Core/Routes.php +++ b/app/Core/Routes.php @@ -42,7 +42,7 @@ class Routes Router::get('/api/photo/comment/rate', 'ApiController@photocommentvote'); if ($user->i('admin') > 0) { Router::any('/admin', 'AdminController@index'); - Router::any('/api/admin/images/setvisibility', 'AdminController@adminsetvis'); + Router::any('/api/admin/images/setvisibility', 'ApiController@adminsetvis'); } Router::get('/logout', 'MainController@logout'); Router::get('/404', 'ExceptionRegister@notfound'); diff --git a/views/components/AdminSidebar.php b/views/components/AdminSidebar.php index a70fa73..1c0a61c 100644 --- a/views/components/AdminSidebar.php +++ b/views/components/AdminSidebar.php @@ -5,12 +5,12 @@ use \App\Core\Page;