Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293393

url_is_external() should be called url_is_absolute() and _external_url_is_local() should be called _absolute_url_is_local()

$
0
0

The idea of "externality" to a Drupal site is rather muddled currently. A Drupal site installed at http://example.com will treat the url "http://example.com" as "external" when checked with url_is_external(). The function _external_url_is_local() comes from here #736172: drupal_goto() should allow absolute destinations that are within the same site and appears in the documentation for Drupal 8 http://api.drupal.org/api/drupal/core%21includes%21common.inc/function/_....

Really, how can something "external" ever be "local", semantically speaking?

Currently "local" means "is this Drupal site" and "internal" means "relative path recognisable by the menu system", "external" means "absolute path" and there is no opposite of local, just "not local".

I think the easiest way to make sense of it all is just to call "external""absolute" instead as that still clearly differentiates from the alternative which is "relative Drupal path" but doesn't allow the user to get it confused with something else.


Viewing all articles
Browse latest Browse all 293393

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>