Skip to main content
Topic: Package manager: add/remove-action (Read 1334 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Package manager: add/remove-action

OP: http://www.elkarte.net/community/index.php?topic=2747.msg18835#msg18835

Add a new operation for the package manager: <add-action action="related" file="Subs-Related.php" controller="Related" method="action_related" />.

Then we can just move all of the actions to a new file which would be a simple array. The package manager would add/remove elements in the array and just write the new array to the file or to $modSettings (which would probably be better). I would keep a file called DefaultActionArray.php somewhere and check if empty($modSettings['action_array']) and if so, load that file just so people don't completely screw their boards and to make it less work for upgrading.

Re: Package manager: add/remove-action

Reply #1

Action are already automagically found following the naming convention[1], I would dare to say that one day $actionArray and the related hook should disappear completely.
So, I'm not sure yet another way to add actions is really that needed.

Or did I miss anything?
A class Something_Controller extends Action_Controller, in a file Something.controller.php placed in the CONTROLLERDIR (or ADMINDIR) directory would be automatically recognized when accessing ?action=something.
Bugs creator.
Features destroyer.
Template killer.