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
0cb3b602
Commit
0cb3b602
authored
Nov 20, 2008
by
Adrian Rossouw
Committed by
adrian
Nov 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialize languages for each profile on platform verify
parent
bd04ac1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
platform/provision_drupal.module
platform/provision_drupal.module
+6
-3
No files found.
platform/provision_drupal.module
View file @
0cb3b602
...
...
@@ -496,6 +496,7 @@ function _provision_find_profiles() {
return
FALSE
;
}
while
(
FALSE
!==
(
$name
=
readdir
(
$dir
)))
{
$languages
=
array
();
$file
=
"./profiles/
$name
/
$name
.profile"
;
if
(
$name
==
'..'
||
$name
==
'.'
||
!
file_exists
(
$file
))
{
continue
;
...
...
@@ -513,9 +514,11 @@ function _provision_find_profiles() {
$languages
[
'en'
]
=
1
;
// Find languages available
$files
=
array_keys
(
file_scan_directory
(
'./profiles/'
.
$name
.
'/translations'
,
'\.po$'
,
array
(
'.'
,
'..'
,
'CVS'
),
0
,
FALSE
,
'filepath'
));
foreach
(
$files
as
$file
)
{
if
(
preg_match
(
'!(/|\.)([^\./]+)\.po$!'
,
$file
,
$langcode
))
{
$languages
[
$langcode
[
2
]]
=
1
;
// use the language name as an index to weed out duplicates
if
(
is_array
(
$files
))
{
foreach
(
$files
as
$file
)
{
if
(
preg_match
(
'!(/|\.)([^\./]+)\.po$!'
,
$file
,
$langcode
))
{
$languages
[
$langcode
[
2
]]
=
1
;
// use the language name as an index to weed out duplicates
}
}
}
$profile
->
info
[
'languages'
]
=
array_keys
(
$languages
);
...
...
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