CMD_DOMAIN: action=modify: single value endpoint

Version 1.561


When modifying a domain, sometimes you really don't want to have to read in all variables for that domain, as the: action=modify requires all values to be passed, anything missing (checkbox) is assumed to be off. This change allows you to specify just the item you wish to modify. For example, to only affect the ssl checkbox, post modify like this: CMD_DOMAIN method: POST action=modify ssl=ON | full omit the ssl= value for off. only_affect=ssl Similar can be done for: only_affect=bandwidth only_affect=quota only_affect=ssl only_affect=force_ssl only_affect=cgi only_affect=php only_affect=www_pointers only_affect=custom_domain_items with their associated values. The same code in DA is used, except each check/set is now surrounded by an "if" statement for that value. By default, they're all turned on. If only_affect= is set, they're all turned off, and only the value set is turned back on and checked/set.

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