Package manager: add/remove-action July 13, 2015, 11:15:25 pm OP: http://www.elkarte.net/community/index.php?topic=2747.msg18835#msg18835Add 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 – July 14, 2015, 08:05:37 am 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?1 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.↵