CMD_API_EMAIL_VACATION with json=yes generating blank output

Version 1.61.0


The CMD_API calls were not originally intended to support json, they were for URL encoded output. However, the desire to want json output is entirely founded, so any cases where json isn't working with the CMD_API calls can be reported and will be fixed. In this case, all CMD_API_EMAIL_* related calls call the same functions as the CMD_EMAIL style calls, however they have their own container to be passed back up to the CMD_API handler. This container override thus trumped the JSON container, thus filling the API container, rather than the JSON container, causing empty json output when json=yes is added. Specific call: CMD_API_EMAIL_VACATION? This is a ***blanket fix for all CMD_API_EMAIL* calls*** where the API container override will now be ignored in favor of the JSON container when json=yes is enabled. Risk of affecting non-json CMD_API_EMAIL* call is present, however without json=yes, they should logically not be affected. Confirm the URL encoding still works fine for CMD_API_EMAIL_VACATION? ---- T25017

Interested to try DirectAdmin? Get a 30-day Free Trial!