EnvironmentalDashboard / community-voices

Community Voices communication technology combines images and words to advance environmental, social and economic sustainability in diverse communities.
https://environmentaldashboard.org/community-voices/
2 stars 1 forks source link

Seperateapisub #47

Closed ethanmichel0 closed 4 years ago

ethanmichel0 commented 4 years ago

Hi Sam, I added a function to the router.php class to determine whether the server was local or not based on code already in the router.php class. I then used this function within the front controller to decide whether to catch exceptions or not depending on whether the server is local or remote. On my machine it appears to work, not catching any exceptions since the server is local. Note also that the README changes from the last pull request are also here and exactly the same, so you can disregard those. Also, please disregard my last attempt to do this task, I believe I deleted that pull request.

Sammidysam commented 4 years ago

If you are creating an isLocal function in Router.php, line 34 should be modified to use it. That will reduce repetitive logic that will then save future bugs.

The @todo by that line probably means it is something to be fixed up later (maybe by using APP_ENV as I recommend).

ethanmichel0 commented 4 years ago

Suggested changes were addressed. See new commit.

ethanmichel0 commented 4 years ago

Okay, I addressed that. I totally overlooked that before!

Sammidysam commented 4 years ago

Looks like the try now has double indentation?

Sammidysam commented 4 years ago

Wonderful! I'll go ahead and merge this since we've been working on it already for a while, so I figure others have already gotten their chance to check it out.