add ability to output iframe.php file to stdout #31326
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Provide an API action for the iframe extension that outputs the iframe.php code to standard out.
Before
The only available API action (
Iframe.installScript
) is to save the iframe.php to the expected location in the web root.However, if you are running CiviCRM with locked down permission that prevents the user that execute the
cv
command from writing to any source directories, theIframe.installScript
action will fail. That makes it hard to automate this process.After
With a new API action,
outputScript
, we can run a cv command the sends the contents of the script to standard out, allowing the user that calls the script to save it to the right spot and/or use sudo or any other method to ensure it get's put in the right place.Comments
We still get "[]" output at the end of the
cv
call. I'm not sure how to suppress that, but it's not that hard to handle.