-
Notifications
You must be signed in to change notification settings - Fork 1
исправление ошибок #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
* @return array | ||
*/ | ||
|
||
function addLotForm(array $postData, array $fileData, mysqli $db, array $categories, int $userId): array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
создать в папке functions файл forms.php либо forms-handle.php и перенести эту функцию туда
* @return string|null | ||
*/ | ||
|
||
function processFileUpload(array $file, string $uploadDir): ?string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
создать в папке functions файл files.php и перенсти функцию туда
* @return array | ||
*/ | ||
|
||
function authenticateUser(string $email, string $password, mysqli $db): array { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mysqli $db заменить на mysqli $link и сделать первым аргументом в функции
* @return int | ||
*/ | ||
|
||
function isUserAuthenticated(mysqli $db): int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
заменить тип на bool
} else { | ||
$categoryId = (int)$_POST['category']; | ||
|
||
$categoryExistsQuery = "SELECT id FROM categories WHERE id = ?"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
с 266 по 273 - можно вынести в отдельную функцию
function checkCategoryExeist(int $id): bool
No description provided.