This would entail: Run through Coder module; function/variable name cleanup; eliminate unused code that was in 1.x branch.

Self-explanatory. Will try to do this task this week.

Could postpone a lot of tasks on this, but will not bother at the moment, until more progress is made on #743162: WARNING: Gigya module is currently poorly supported/needs new stable branch.

Comments

EvanDonovan’s picture

EvanDonovan’s picture

Version: 6.x-2.0 » 6.x-2.x-dev
Assigned: EvanDonovan » Unassigned

Unassigning myself from this. Have added to the roadmap.

azinck’s picture

Assigned: Unassigned » azinck

My plan at this point is to knock out the critical bugs/features first and refactor as I go. As I come to features that may require more significant architecture changes we'll assess them at that time. Cleaning up the javascript, however, really is a project unto itself.

EvanDonovan’s picture

That makes sense. Did you see the update I just made to the roadmap issue? I'd be curious for your input.

Maybe we should just reduce the scope of *this* issue to code style then (i.e., Coder module). If the module's code style were cleaned up now, that would definitely help us moving forward.

EvanDonovan’s picture

Aside from code style, all the commented out parts of the module that are no longer in use should also be removed. That would just make things simpler for everyone, I think.

add1sun’s picture

Title: Code needs massive refactoring/cleanup » Code needs massive standards cleanup
Assigned: azinck » Unassigned
Status: Active » Needs review
StatusFileSize
new158.44 KB

OK, here is a mega patch that hits a lot of the styling/standards cleanup. There are a few important notes here though:

1. I changed a number of PHP function names that were using camelCase. I'm pretty sure I cleaned up all of the internal references but if anyone wrote custom code using those functions, their work will break. We should probably add a note to the README or create an UPDATE.txt for tracking the changes in the module where we can flag this for people. If this seems too extreme I can back those changes out and save it for a V3 of the module, but it really would be good to clean this up. (Should also note that the JS files need a similar cleanup in the other direction, but I'll look at that when I get to them.)
2. The OAuth.inc and all JS files have not been done yet, aside from a global white space cleanup I did.
3. I left a lot if "Undocumented XXX" in the comments, which I'll go back and fill in over time, but I wanted to set up the expected standard in case anyone else feels like helping out with that. ;-)

azinck’s picture

Thanks, add1sun. I've reviewed your changes and committed to dev.

azinck’s picture

Status: Needs review » Fixed
EvanDonovan’s picture

Thanks, so much, add1sun for doing this. I am probably going to test the Gigya dev release tomorrow, since I realized a way that I can use it on my site while still using panel pages (that disable regions).

add1sun’s picture

Priority: Critical » Normal
Status: Fixed » Needs review
StatusFileSize
new27.27 KB

Here is a follow up patch that fixes up the JS standards a bit, fixes a few camel/underscore things I missed, cleans up some more formatting stuff, along with a few WTF? comments. ;-)

azinck’s picture

Thanks,

Unfortunately I committed a minor change (variable naming problem) after checking in your last patch so this patch is not rolled against the latest version of dev. I'm not going to have time to mess with it right now so if it's important to you that it get checked in before Sunday then I'd love it if you'd re-roll. Otherwise I'll take care of it later. Thanks again!

azinck’s picture

Never mind :) -- found the time. It's now committed. I made another small change so you'll want to update to the latest dev before rolling any more patches. I'll also start documenting some of the functions as I go.

add1sun’s picture

StatusFileSize
new17.02 KB

Woot! Here is another one. We were spitting a ton of PHP notices, which pointed out some oopsies. The biggest line change was moving the constants into the .module file instead of admin.inc because you are using those constants in more than one file now. I also removed the module version constant (and the 2 places it was used, one of which wasn't actually called anywhere) since we'd need to keep remembering to update it manually which is silly. People can see which version they are using in the module admin page.

azinck’s picture

I'm sure glad I haven't done much coding on this lately, merging would be annoying ;). J/k, in all seriousness, thanks for the patch.

add1sun’s picture

ANy chance we can get this last patch in soon so we don't end up with funky conflicts? I think we can call this closed after this one and any additional cleanups down the road should be in new issues.

azinck’s picture

Status: Needs review » Fixed

Ok, finally got around to committing to dev! Thanks!

EvanDonovan’s picture

@add1sun: Were the permissions that weren't being used by the module removed? That was a cleanup someone had asked me about a while back.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.