spreedbox / nextcloud-spreedbox-license-keys

Nextcloud app for the Spreedbox license key management.
GNU Affero General Public License v3.0
0 stars 0 forks source link

Don't use temporary file to pipe data to "spreedbox-license-keys" #5

Open fancycode opened 7 years ago

fancycode commented 7 years ago

Creating a temporary file to pass data to the spreedbox-license-keys tool is unnecessary, this can be done directly using proc_open.

See http://stackoverflow.com/questions/2390604/how-to-pass-variables-as-stdin-into-command-line-from-php for an example.

This applies to https://github.com/spreedbox/nextcloud-spreedbox-license-keys/blob/649f9f77ffd27044d091a3cbb6323671197fcc73/lib/Controller/LicenseController.php#L17 and similar occurrences.

PeterEdens commented 7 years ago

Thanks, this is now being used for requesting the license when passing the json to spreedbox-license-keys. The install license code is using this this also.