Closed (works as designed)
Project:
Install Profile API (obsolete)
Version:
6.x-2.x-dev
Component:
CRUD functions and includes
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
13 Apr 2009 at 23:20 UTC
Updated:
28 Apr 2010 at 12:59 UTC
Jump to comment: Most recent file
Comments
Comment #1
dman commentedO_o
A small patch that does all that?
I assume the expected import inc file for views is one such as returned by the views export feature ...
But can install_node_export_import_from_file() really handle importing a view?
Comment #2
dman commentedHere's what I came up with after tracing the code step by step.
I get the feeling there is a better API under the hood somewhere, but don't know what it's called.
So I emulate pasting an exported view into the views_ui import form :-}
Comment #3
James Andres commentedHah! You're completely right, that is quite a typo. Here is a new patch.
Comment #4
James Andres commentedWhat advantage does your
profile_create_view_from_file($filename)function have over the currentinstall_views_ui_import_from_file($file, $name = NULL)function committed to the DRUPAL-6--2 branch?Or maybe I don't understand the question?
Comment #5
dman commentedAdvantage? Possibly none apart from actually existing. I can't find the func you mention in any of my checkouts, but it sounds really useful. I wish it did exist, and that I'd known about it.
I'm mostly just posting my code up here for comparison.
I saw broken code in the patch, and supplied an alternative that worked for me because I needed it right then.
Later, it seems like you applied a better alternative, by calling in a library that I didn't have available. That's what happened there.
Comment #6
James Andres commentedHi dman,
The function is in the contrib/views.inc file in the DRUPAL-6--2 branch. Note, this is CVS only at the moment, downloading the latest release from the install_profile_api homepage won't contain this code.
Thanks,
James.
Comment #7
dman commentedI sorta guessed as much. Looking forward to trying it out. It sounds like what I'm looking for.
My contribution here was hoping that an answer like this was/would-be available. But trying to be proactive in the meantime.
Comment #8
James Andres commented