Skip to content

Conversation

devinmatte
Copy link
Member

@devinmatte devinmatte commented Mar 28, 2018

Adds a simple check that before actually running through a result, PHP stops and returns an error

This will prevent super large schedules from being generated, as well as reducing processing on the sever from people generating the super large options.

Fixes #133

Adds a simple check that before actually running through a result, PHP stops and returns an error
@devinmatte devinmatte self-assigned this Mar 28, 2018
@devinmatte devinmatte requested a review from bgrawi March 28, 2018 20:36
api/generate.php Outdated
$totalSchedules *= count($_POST["courses{$i}Opt"]);
}
if ($totalSchedules >= 10000){
echo json_encode(array("error" => "argument", "msg" => "Too many schedule possibilities to generate, try to prune possibilities.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would word this differently, "prune possibilities" -> "remove class sections you know you don't want from your cart" or something that flows better :)

@devinmatte devinmatte merged commit 818eb66 into ComputerScienceHouse:develop Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants