It makes sense to use the CTools drush commands where possible as they work for any exportable. As views are exportables we can just invoke the CTools drush commands to do this for us. This means we have less code to maintain in the views.drush.inc (alot less!), which is always a win.
This patch basically changed the views-revert, views-enable, and views-disable commands to use one drush_views_exportable_ops() command that deals with all of them. From this command, the appropriate command(s) are invoked from the CTools code. So the view drush commands are just convenience wrappers for the CTools commands.
Here is an initial patch, there is much less code now :)
Comment | File | Size | Author |
---|---|---|---|
views_drush_ctools_commands.patch | 7.68 KB | damiankloip | |
Comments
Comment #1
damiankloip CreditAttribution: damiankloip commentedComment #2
swentel CreditAttribution: swentel commentedProbably nitpicking here, but there's also this option to rebuild the menu router:
I'm a huge fan of this one, but this might not be really a big issue since we're invoking commands through drush. I usually have issues with menu_rebuild when calling that function in say a submit function of a form. Looks good to me other than that to me.
Comment #3
swentel CreditAttribution: swentel commentedDidn't mean to set this 'needs work'
Comment #4
damiankloip CreditAttribution: damiankloip commentedThanks swentel, I think you are right, much less of an issue as we are using the cli. However, if people think it's better to set the variable to invoke a menu rebuild on the next request, that's cool.
Comment #5
tim.plunkettConfession: today was the first time I used views-analyze. It's awesome!
I only had one problem:
With the patch, this no longer works. It only gives you
I always used that feature, and I'd rather not see it go.