Closed (fixed)
Project:
Hosting
Version:
6.x-0.4-alpha3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Dec 2010 at 09:20 UTC
Updated:
12 Jun 2014 at 08:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
univate commentedThe task form only include 'simple' tasks where you don't have to provide other information.
In the case of more complex tasks that need to do something else the current code checks if there is a form requesting any additional information and skips those tasks:
Since backup was one of the operations that I wanted in this bulk operation form, so the following patch will now check over the form for '#required' = FALSE and if all the elements are not required it can now still add those item to the list. Its a little crude but works.
Comment #2
univate commentedChanging this issue to a feature request.
Comment #3
univate commentedThis patch now also hide tasks that are marked as hidden, so 'install' and 'import' tasks will not show up in the list which takes care of the issue: #1003908: The bulk operations form for site listings shouldn't list install and import tasks
Comment #4
Anonymous (not verified) commentedSo can I confirm here '$func_required' means 'input required'? Would it be less cryptic to change it to $input_required ? Just musing out loud.
It didn't occur to me at the time that backup (of course) requires input and so was not shown here. I'm ok with that.. does that still require all that code to be there? Since it sounds like it worked as designed in the first place.
Finally, if you do want to perform this check, I wonder if there is a way to fetch the 'dialog' attribute from the task rather than check in the loop for a #required element in the form.
For instance, in hosting_site_hosting_tasks()
tasks with 'dialog' => TRUE require input, those that don't, don't. This might be a cleaner method of checking for user input required.
However this is just a high level review: I'm not sure if that information from hook_hosting_tasks() is even available to us when this check is performed
Comment #5
Anonymous (not verified) commentedActually I guess checking for dialog => TRUE would only leave two bulk tasks available: Verify and Login Reset :) so perhaps this isn't such a good idea after all.
Comment #6
univate commentedExactly dialog -> true is also used on tasks that just have a confirmation box.
We should include tasks like backup, as while that has the option to add some text its only optional, so can be done in bulk quite easily. Its tasks like clone that require you to select a new platform and new url are probably not going to be possible to do in bulk.
Comment #7
univate commentedAnd yes, $input_required might be a better variable name for the above.
Comment #8
anarcat commentedfix committed, thanks!
I have removed those funky === TRUE/FALSE calls that didn't seem to serve any purpose and were making the code harder to read. I also renamed a variable for clarity.