#3243 - Eliminate cms_srv function

Identifier #3243
Issue type Feature request or suggestion
Title Eliminate cms_srv function
Status Completed
Tags

Risk: Core rearchitecting (custom)

Handling member Chris Graham
Addon core
Description We now have a function 'fixup_bad_php_env_vars' which is doing complicated pre-cleanup of PHP $_SERVER settings which are often not working correctly.

cms_srv serves a similar function.

It would be simpler to just let developers use $_SERVER directly, knowing we've cleaned it up fully so its reliable.

For this change:

Implement new get_local_hostname() function, instead of cms_srv('HTTP_HOST'). This takes some of the old logic from cms_srv that isn't cleanup related.

In fixup_bad_php_env_vars copy from LOCAL_ADDR to SERVER_ADDR if missing.

In fixup_bad_php_env_vars copy from $_ENV to $_SERVER if missing, then simplify remaining logic of function to only use $_SERVER.

Change all remaining cms_srv calls to use $_SERVER directly.

Removing cms_srv function.
Steps to reproduce

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated