add new values

This commit is contained in:
themohooks 2024-07-21 01:35:44 +03:00
parent d69509ad83
commit b60cb68941
2 changed files with 4 additions and 1 deletions

View file

@ -38,6 +38,9 @@ ngallery:
prohibited_usernames: ''
access:
public: true
video:
upload:
allow: true
photo:
upload:
allow: true

View file

@ -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()));