mirror of
https://github.com/claradex/nativegallery.git
synced 2024-12-23 00:50:55 +03:00
add new values
This commit is contained in:
parent
d69509ad83
commit
b60cb68941
2 changed files with 4 additions and 1 deletions
|
@ -38,6 +38,9 @@ ngallery:
|
||||||
prohibited_usernames: ''
|
prohibited_usernames: ''
|
||||||
access:
|
access:
|
||||||
public: true
|
public: true
|
||||||
|
video:
|
||||||
|
upload:
|
||||||
|
allow: true
|
||||||
photo:
|
photo:
|
||||||
upload:
|
upload:
|
||||||
allow: true
|
allow: true
|
||||||
|
|
|
@ -13,7 +13,7 @@ if ($photo->i('id') !== null) {
|
||||||
} else {
|
} else {
|
||||||
$moderated = false;
|
$moderated = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else if ($photo->i('moderated') === 1) {
|
||||||
$moderated = true;
|
$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) {
|
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()));
|
DB::query('INSERT INTO photos_views VALUES (\'0\', :uid, :pid, :time)', array(':uid' => Auth::userid(), ':pid' => $id, ':time' => time()));
|
||||||
|
|
Loading…
Reference in a new issue