diff --git a/ngallery-example.yaml b/ngallery-example.yaml index 3f0a2c8..cdbed3a 100644 --- a/ngallery-example.yaml +++ b/ngallery-example.yaml @@ -38,6 +38,9 @@ ngallery: prohibited_usernames: '' access: public: true + video: + upload: + allow: true photo: upload: allow: true diff --git a/views/pages/Photo.php b/views/pages/Photo.php index f75169a..b70b3c8 100644 --- a/views/pages/Photo.php +++ b/views/pages/Photo.php @@ -13,7 +13,7 @@ if ($photo->i('id') !== null) { } else { $moderated = false; } - } else { + } else if ($photo->i('moderated') === 1) { $moderated = true; if (DB::query('SELECT * FROM photos_views WHERE user_id=:uid AND photo_id=:pid ORDER BY id DESC LIMIT 1', array(':uid' => Auth::userid(), ':pid' => $id))[0]['time'] <= time() - 86400) { DB::query('INSERT INTO photos_views VALUES (\'0\', :uid, :pid, :time)', array(':uid' => Auth::userid(), ':pid' => $id, ':time' => time()));