This patch adds a "Custom platform tasks" text entry field to the Hosting Settings page, which allows for the entry of a space-delimited list of additional platform task names that should be listed in the platform task list of a platform node display page. Currently, the list of allowed platform tasks is restricted by a hard-coded list in the 'hosting_task.module' file. Our use-case is that we created a local platform task that needed to be displayed to our users--part of a local module that is equivalent to the Hosting Tasks Extra module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kfolsom created an issue. See original summary.

kfolsom’s picture

colan’s picture

Status: Active » Needs work
  1. +++ b/task/hosting_task.module
    @@ -95,6 +95,22 @@ function hosting_task_menu() {
    +} ¶
    

    Extra whitespace at the end of all 3 of these lines.

  2. +++ b/task/hosting_task.module
    @@ -308,6 +324,22 @@ function hosting_task_menu_access($node, $task) {
    +          } ¶
    +        } ¶
    +      } ¶
    

    Extra whitespace at end.

  3. Do you need a form alter hook? Why not just add to the original form?
kfolsom’s picture

Good point on just adding to the original form. My thought process was to introduce new code blocks while affecting existing blocks as little as possible, but that does lead to added complexity. I'd be glad to re-work the patch. Other than that and the white space (which I'll eventually remember to check for!), does this feature addition seem worthwhile?

Thanks,
Keith

kfolsom’s picture

Actually, looking back to when I did this work, I was also following the example of the hook_form_alter() implemented by the "Platforms" module in hosting_platform.module. It uses a hook_form_alter() to add the "Platform base path" setting. Another consideration is that all my changes were limited to a single module rather than being made in both "Hosting tasks" and "Hosting". The hook also keeps the setting with the module it is relevant to.

So I'd prefer to stick with the use of hook_form_alter() for the patch.

Thanks,
Keith

kfolsom’s picture

The patch with whitespace fixed. Thanks for catching that.

Keith