Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
provision
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
provision
Commits
1cda2beb
Commit
1cda2beb
authored
Mar 01, 2017
by
ergonlogic
Committed by
Aegir user
Mar 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2650290
: Search for packages in D8 profiles under subdirs.
parent
1711e18f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
25 deletions
+74
-25
platform/drupal/packages_6.inc
platform/drupal/packages_6.inc
+22
-0
platform/drupal/packages_7.inc
platform/drupal/packages_7.inc
+22
-0
platform/drupal/packages_8.inc
platform/drupal/packages_8.inc
+30
-3
platform/provision_drupal.drush.inc
platform/provision_drupal.drush.inc
+0
-22
No files found.
platform/drupal/packages_6.inc
View file @
1cda2beb
...
...
@@ -243,3 +243,25 @@ function _provision_find_profiles() {
}
return
$profiles
;
}
/**
* Retrieve a list of paths to search in a certain scope
*/
function
_provision_drupal_search_paths
(
$scope
,
$key
=
''
,
$type
=
'modules'
)
{
$searchpaths
=
array
();
$drupal_root
=
drush_get_context
(
'DRUSH_DRUPAL_ROOT'
);
switch
(
$scope
)
{
case
'base'
:
$searchpaths
[]
=
sprintf
(
"%s/%s"
,
$drupal_root
,
$type
);
$searchpaths
[]
=
sprintf
(
"%s/sites/all/%s"
,
$drupal_root
,
$type
);
break
;
default
:
if
(
$key
)
{
$searchpaths
[]
=
sprintf
(
"%s/%s/%s/%s"
,
$drupal_root
,
$scope
,
$key
,
$type
);
}
break
;
}
return
$searchpaths
;
}
platform/drupal/packages_7.inc
View file @
1cda2beb
...
...
@@ -260,3 +260,25 @@ function _provision_find_profiles() {
}
return
$profiles
;
}
/**
* Retrieve a list of paths to search in a certain scope
*/
function
_provision_drupal_search_paths
(
$scope
,
$key
=
''
,
$type
=
'modules'
)
{
$searchpaths
=
array
();
$drupal_root
=
drush_get_context
(
'DRUSH_DRUPAL_ROOT'
);
switch
(
$scope
)
{
case
'base'
:
$searchpaths
[]
=
sprintf
(
"%s/%s"
,
$drupal_root
,
$type
);
$searchpaths
[]
=
sprintf
(
"%s/sites/all/%s"
,
$drupal_root
,
$type
);
break
;
default
:
if
(
$key
)
{
$searchpaths
[]
=
sprintf
(
"%s/%s/%s/%s"
,
$drupal_root
,
$scope
,
$key
,
$type
);
}
break
;
}
return
$searchpaths
;
}
platform/drupal/packages_8.inc
View file @
1cda2beb
...
...
@@ -135,10 +135,10 @@ function _provision_find_profiles() {
$profile
->
name
=
$info
[
'name'
];
$profile
->
info
=
$info
;
$profile
->
filename
=
$path
;
$profile
_
path
=
dirname
(
$path
);
$profile
->
info
[
'languages'
]
=
_provision_find_profile_languages
(
$profile
_
path
);
$profile
->
path
=
dirname
(
$path
);
$profile
->
info
[
'languages'
]
=
_provision_find_profile_languages
(
$profile
->
path
);
$profiles
[
basename
(
$profile
_
path
)]
=
$profile
;
$profiles
[
basename
(
$profile
->
path
)]
=
$profile
;
drush_log
(
dt
(
'Found install profile %name'
,
array
(
'%name'
=>
$name
)));
}
}
...
...
@@ -146,3 +146,30 @@ function _provision_find_profiles() {
return
$profiles
;
}
/**
* Retrieve a list of paths to search in a certain scope
*/
function
_provision_drupal_search_paths
(
$scope
,
$key
=
''
,
$type
=
'modules'
)
{
$searchpaths
=
array
();
$drupal_root
=
drush_get_context
(
'DRUSH_DRUPAL_ROOT'
);
switch
(
$scope
)
{
case
'base'
:
$searchpaths
[]
=
sprintf
(
"%s/%s"
,
$drupal_root
,
$type
);
$searchpaths
[]
=
sprintf
(
"%s/core/%s"
,
$drupal_root
,
$type
);
$searchpaths
[]
=
sprintf
(
"%s/sites/all/%s"
,
$drupal_root
,
$type
);
break
;
case
'profiles'
:
foreach
(
_provision_find_profiles
()
as
$profile
)
{
$searchpaths
[]
=
$profile
->
path
;
}
break
;
default
:
if
(
$key
)
{
$searchpaths
[]
=
sprintf
(
"%s/%s/%s/%s"
,
$drupal_root
,
$scope
,
$key
,
$type
);
}
break
;
}
return
$searchpaths
;
}
platform/provision_drupal.drush.inc
View file @
1cda2beb
...
...
@@ -541,28 +541,6 @@ function provision_drupal_system_map() {
return
_provision_drupal_system_map
();
}
/**
* Retrieve a list of paths to search in a certain scope
*/
function
_provision_drupal_search_paths
(
$scope
,
$key
=
''
,
$type
=
'modules'
)
{
$searchpaths
=
array
();
$drupal_root
=
drush_get_context
(
'DRUSH_DRUPAL_ROOT'
);
switch
(
$scope
)
{
case
'base'
:
$searchpaths
[]
=
sprintf
(
"%s/%s"
,
$drupal_root
,
$type
);
$searchpaths
[]
=
sprintf
(
"%s/core/%s"
,
$drupal_root
,
$type
);
$searchpaths
[]
=
sprintf
(
"%s/sites/all/%s"
,
$drupal_root
,
$type
);
break
;
default
:
if
(
$key
)
{
$searchpaths
[]
=
sprintf
(
"%s/%s/%s/%s"
,
$drupal_root
,
$scope
,
$key
,
$type
);
}
break
;
}
return
$searchpaths
;
}
/**
* Find modules in a certain scope.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment