You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 3 possibilities when running a b command on a Backdrop site:
It's a regular, non-multisite setup
It's a multisite setup and you know the site
It's a multisite setup and you don't know the site
In the first situation, any site-specific commands/information should be possible as the 'site' is the root dir of Backdrop (e.g. /settings.php).
In the second situation, you're either running the command from the site dir, or you specified the --url option, so the site is known. Site-specific commands/info are possible (e.g. the site is /sites/[site]/settings.php).
In the third situation, you're running the command from outside the site dir (e.g. Backdrop root) and you didn't specify the --url option, so the site is unknown. Site-specific commands/info are not possible (e.g. we don't know the site dir to use to find settings.php, and we can't use the root settings.php as it'll be empty).
Currently, situations 1 and 3 are indistinguishable as BACKDROP_SITE is not set in either case (either because it's the same as BACKDROP_ROOT or because we don't know what it is). This is problematic as we can't provide site-specific info for the first situation when we otherwise should be.
So I propose a new b_is_multisite() function that looks something like this:
There are 3 possibilities when running a
b
command on a Backdrop site:In the first situation, any site-specific commands/information should be possible as the 'site' is the root dir of Backdrop (e.g.
/settings.php
).In the second situation, you're either running the command from the site dir, or you specified the
--url
option, so the site is known. Site-specific commands/info are possible (e.g. the site is/sites/[site]/settings.php
).In the third situation, you're running the command from outside the site dir (e.g. Backdrop root) and you didn't specify the
--url
option, so the site is unknown. Site-specific commands/info are not possible (e.g. we don't know the site dir to use to findsettings.php
, and we can't use the rootsettings.php
as it'll be empty).Currently, situations 1 and 3 are indistinguishable as
BACKDROP_SITE
is not set in either case (either because it's the same asBACKDROP_ROOT
or because we don't know what it is). This is problematic as we can't provide site-specific info for the first situation when we otherwise should be.So I propose a new
b_is_multisite()
function that looks something like this:This will allow us to distinguish between situations 1 and 3 and provide appropriate commands/info as necessary.
The text was updated successfully, but these errors were encountered: