Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Multiple use cases for this one:
- server farms, to be able to know which host performed some specific operation, although all use the same DB and hence have the same site:name
- development, where all dev / profile / prod sites are likely to share the same site:name too, but differ in their hostname
Comment | File | Size | Author |
---|---|---|---|
#4 | interdiff.txt | 679 bytes | fgm |
Comments
Comment #1
fgmAnd a possible implementation.
Comment #2
fgmAdded a static cache: php_uname() does not cache its result and does a uname(2) system call every time, so it is better to skip it.
Comment #4
fgmNo reason for patch #2 failing: both versions pass on my machine, and here is an interdiff: the change does not touch the options.
interdiff attached.
Comment #5
Dave Reid#2: 0001-Issue-1542272-by-fgm-Add-a-site-hostname-token.patch queued for re-testing.
Comment #6
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 7 year old patch in #2 to token.tokens.inc applied cleanly to the latest token 7.x-1.x-dev and if applicable still needs review.