ctrlcctrlv / infinity

A vichan fork permitting users to create their own boards
Other
318 stars 149 forks source link

Refactoring post.php - Step 1 #534

Closed Cipherwraith closed 8 years ago

Cipherwraith commented 8 years ago

Removed functions from random places in the code and put them all in one place.

Split up the if..elseif..elseif.. pattern we had before.

Made an extremely rudimentary controller to route the different POST requests.

Ive only checked this for syntax. I dont have a running copy of infinity to test if it actually works or not. Regardless, I am confident because there arent so many sweeping changes.

ctrlcctrlv commented 8 years ago

Looks good to me. Still much more to do. While it splits the post logic into its own function, the post logic itself is a ton of "fun with arrays" and calls every which way. Nevertheless I like it, I'll pull to private vfec branch and merge to master by the 25th.

function doomsday is a nice touch :+1:

Cipherwraith commented 8 years ago

Great. The functions themselves still have plenty of spaghetti that I need to organize. Just wanted to see if you think this direction is okay before I spend time straightening everything out.

czaks commented 8 years ago

There are some issues with the code. For example, $config isn't a superglobal. For now, I suppose no one tested this code.

ctrlcctrlv commented 8 years ago

@czaks I pulled it and found it doesn't work even without my changes. I don't have time to test it. Commits should be tested locally before PR opened, the installation guide is sort of up to date.

Cipherwraith commented 8 years ago

Thanks for the feedback guys. Ill setup a local instance and test before making any more pulls. Cheers.