diff --git a/app/Controllers/Api/Images/Upload.php b/app/Controllers/Api/Images/Upload.php index 79dcb6d..a42cb24 100644 --- a/app/Controllers/Api/Images/Upload.php +++ b/app/Controllers/Api/Images/Upload.php @@ -19,7 +19,7 @@ class Upload { $user = new \App\Models\User(Auth::userid()); if (NGALLERY['root']['photo']['upload']['premoderation'] === true) { - if ($user->content('premoderation') === true) { + if ($user->content('premoderation') === "true") { $moderated = 1; } else { $moderated = 0; diff --git a/app/Controllers/Api/Register.php b/app/Controllers/Api/Register.php index 31441d1..f141280 100644 --- a/app/Controllers/Api/Register.php +++ b/app/Controllers/Api/Register.php @@ -98,7 +98,7 @@ class Register ) ); - DB::query('INSERT INTO users VALUES (\'0\', :username, :email, :password, :photourl, 5, 0, :online, 0, :content)', array(':username' => ltrim($username), ':password' => password_hash(ltrim($password), PASSWORD_BCRYPT), ':photourl'=>'/static/img/avatar.png', ':email' => $email, ':content' => $content, ':online'=>time())); + DB::query('INSERT INTO users VALUES (\'0\', :username, :email, :password, :photourl, 5, 0, :online, 0, 0, :content)', array(':username' => ltrim($username), ':password' => password_hash(ltrim($password), PASSWORD_BCRYPT), ':photourl'=>'/static/img/avatar.png', ':email' => $email, ':content' => $content, ':online'=>time())); $cstrong = True; $token = GenerateRandomStr::gen_uuid(); $user_id = DB::query('SELECT id FROM users WHERE username=:username', array(':username' => $username))[0]['id']; diff --git a/views/pages/Admin/Photo.php b/views/pages/Admin/Photo.php index ee75093..b315882 100644 --- a/views/pages/Admin/Photo.php +++ b/views/pages/Admin/Photo.php @@ -83,7 +83,7 @@ use \App\Models\User; '; if ($p['moderated'] === 0) { - echo '
Принять
Отклонить
'; + echo '
Принять
Отклонить
'; } echo ' '; diff --git a/views/pages/Profile/UploadPhoto.php b/views/pages/Profile/UploadPhoto.php index a5d8bff..f01ed9b 100644 --- a/views/pages/Profile/UploadPhoto.php +++ b/views/pages/Profile/UploadPhoto.php @@ -44,7 +44,7 @@ $user = new User(Auth::userid());
content('premoderation') === true) { + if ($user->content('premoderation') === "true") { echo '
Поздравляем, ' . $user->i('username') . '!
Администрацией ' . NGALLERY['root']['title'] . ' была одобрена возможность прямой загрузки фотографий для Вас.
Вы можете моментально загрузить любую фотографию, минуя премодерацию. Enjoy!
'; } }