elkarte/Elkarte — pull request #963 by Spuds (2013-11-02 04:20:40+00:00)
Title: Admin Consistency

This looks ugly but its really not that much in terms of change.

I went through the ManageXYZ controllers and tried to make the action_index functions flow the same.

Some used isAllowed(), some used the Action controller permission, some used the Action controller method ->isAllowed. There were a couple lacking checks at all.

I chose to used the permissions flag in the subActions array and let the controller do the check (almost everywhere), if processing steps could be saved I used the isAllowed method earlier in a few places. I chose that as it seemed the best with the integration hooks that are in almost all of these controllers.

I also placed $context items together, made sure the page_title was set in all, removed un-needed (redundant) isAllowed calls, placed common "items" in the same general locations, made sure the default action was set in the initiate call (for those times the requested sa is disabled), etc ...

So in the end, nothing should have changed, but things should look more consistent, easier to maintain.