Commit 65c06028 authored by Adrian Rossouw's avatar Adrian Rossouw Committed by adrian

Add constants for base url and domain

parent 9e54f3d7
...@@ -51,6 +51,7 @@ function provision_init() { ...@@ -51,6 +51,7 @@ function provision_init() {
// Set up defines for platform // Set up defines for platform
if (function_exists('drush_get_option')) { if (function_exists('drush_get_option')) {
$docroot = drush_get_option(array("r", "root"), $_SERVER['PWD']); $docroot = drush_get_option(array("r", "root"), $_SERVER['PWD']);
define('PROVISION_DOMAIN', drush_get_option(array('l', 'uri'), $_SERVER['HTTP_HOST']));
} }
else { else {
$docroot = $_SERVER['pwd']; $docroot = $_SERVER['pwd'];
...@@ -83,6 +84,7 @@ function provision_init() { ...@@ -83,6 +84,7 @@ function provision_init() {
global $base_url; global $base_url;
define('PROVISION_BASE_URL', $base_url);
define('PROVISION_WEB_DISABLE_URL', define('PROVISION_WEB_DISABLE_URL',
variable_get('provision_web_disable_url', $base_url . '/provision/disabled')); variable_get('provision_web_disable_url', $base_url . '/provision/disabled'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment