Spuds/Dialogo — pull request #31 by norv (2012-12-13 22:06:29+00:00)
Title: Dispatch updates

Please review this PR. What it does:

* rename many functions that process user/mod/admin actions, with the pattern action_whatitdoes()

Examples: action_login() (formerly Login()), action_sendtopic() (formerly SendTopic())

* several files respect an even stricter pattern:

for index.php?action=something;sa=somedetail, the file which processes the actions is named Something.php, while the functions are named action_somedetail()

Example: index.php?action=emailuser;sa=sendtopic is processed by: file Emailuser.php, function action_sendtopic(). (was: SendTopic.php, SendTopic())

index.php?action=profile;area=history;sa=ip is processed by: file ProfileHistory.php, function action_trackip()

* several refactorings, move functions in their own files, to be easier to work with

Example: action=announce is now forwarded to Announce.php (and its functions, for each subaction of action=announce, such as sa=send)

* a few templates changes, to be inline with the changes in the core files

Example: move the topic announcement subtemplates from Post.php to Announce.template.php. (template_announce(), template_announcement_send())

* several updates and fixes to the dispatching mechanism.

I would consider this PR a stage two, of the refactoring on actions, in the core files and for add-ons... None of the files is switched to an object oriented controller, they're our known functions... only named differently and moved around a bit. I send this however, because if it is acceptable, it's probably better to try to put it to test and to avoid most merge conflicts with further work.

Theoretically, it should still be backwards compatible...