Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
acquia_search-3298196
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
acquia_search-3298196
Commits
14f2d50f
Commit
14f2d50f
authored
12 years ago
by
Peter Wolanin
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1791684
by pwolanin: Follow up to Allow Acquia Search to insert alternative url
parent
88e84e1f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
acquia_search.module
+11
-13
11 additions, 13 deletions
acquia_search.module
with
11 additions
and
13 deletions
acquia_search.module
+
11
−
13
View file @
14f2d50f
...
...
@@ -27,30 +27,28 @@ function _acquia_search_set_variables() {
$subscription
=
acquia_agent_settings
(
'acquia_subscription_data'
);
$search_host
=
variable_get
(
'acquia_search_host'
,
'search.acquia.com'
);
// @todo rework this logic once we have AH_SERVER_REGION
// legacy_internal will be true if 'internal
.
' is the start of the host
// legacy_internal will be true if 'internal
-
' is the start of the host
// name that's set in via Acquia Cloud platform or vset.
$legacy_internal
=
(
strpos
(
$search_host
,
'internal.'
)
===
0
);
$legacy_internal
=
preg_match
(
'/internal[-.]/'
,
$search_host
);
// Adding the subscription specific colony to the heartbeat data
if
(
!
empty
(
$subscription
[
'heartbeat_data'
][
'search_service_colony'
]))
{
$search_host
=
$subscription
[
'heartbeat_data'
][
'search_service_colony'
];
if
(
$legacy_internal
)
{
// If we want to be using an internal host name, fix the one
// from the hearbeat data here.
$search_host
=
'internal
.
'
.
$search_host
;
$search_host
=
'internal
-
'
.
$search_host
;
}
}
else
{
// Check if we are on Acquia Cloud hosting. @see NN-2503
if
(
!
empty
(
$_ENV
[
'AH_SITE_ENVIRONMENT'
])
&&
!
empty
(
$_ENV
[
'AH_SERVER_REGION'
]))
{
if
(
$_ENV
[
'AH_SERVER_REGION'
]
==
'us-east-1'
&&
$search_host
==
'search.acquia.com'
)
{
$search_host
=
'internal.search.acquia.com'
;
}
elseif
(
strpos
(
$search_host
,
'search-'
.
$_ENV
[
'AH_SERVER_REGION'
])
===
0
)
{
$search_host
=
'internal.'
.
$search_host
;
}
// Check if we are on Acquia Cloud hosting. @see NN-2503
if
(
!
empty
(
$_ENV
[
'AH_SITE_ENVIRONMENT'
])
&&
!
empty
(
$_ENV
[
'AH_SERVER_REGION'
]))
{
if
(
$_ENV
[
'AH_SERVER_REGION'
]
==
'us-east-1'
&&
$search_host
==
'search.acquia.com'
)
{
$search_host
=
'internal-search.acquia.com'
;
}
elseif
(
strpos
(
$search_host
,
'search-'
.
$_ENV
[
'AH_SERVER_REGION'
])
===
0
)
{
$search_host
=
'internal-'
.
$search_host
;
}
}
variable_set
(
'apachesolr_host'
,
$search_host
);
variable_set
(
'apachesolr_port'
,
variable_get
(
'acquia_search_port'
,
'80'
));
variable_set
(
'apachesolr_path'
,
variable_get
(
'acquia_search_path'
,
'/solr/'
.
$identifier
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment