Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
drupal
Commits
45dc99c8
Commit
45dc99c8
authored
14 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
#738454
by bradweikel: error if module uninstalled and no language file.
parent
a309cb42
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/locale/locale.install
+11
-8
11 additions, 8 deletions
modules/locale/locale.install
with
11 additions
and
8 deletions
modules/locale/locale.install
+
11
−
8
View file @
45dc99c8
...
...
@@ -119,15 +119,18 @@ function locale_update_7002() {
function
locale_uninstall
()
{
// Delete all JavaScript translation files.
$locale_js_directory
=
'public://'
.
variable_get
(
'locale_js_directory'
,
'languages'
);
$files
=
db_query
(
'SELECT language, javascript FROM {languages}'
);
foreach
(
$files
as
$file
)
{
if
(
!
empty
(
$file
->
javascript
))
{
file_unmanaged_delete
(
$locale_js_directory
.
'/'
.
$file
->
language
.
'_'
.
$file
->
javascript
.
'.js'
);
if
(
is_dir
(
$locale_js_directory
))
{
$files
=
db_query
(
'SELECT language, javascript FROM {languages}'
);
foreach
(
$files
as
$file
)
{
if
(
!
empty
(
$file
->
javascript
))
{
file_unmanaged_delete
(
$locale_js_directory
.
'/'
.
$file
->
language
.
'_'
.
$file
->
javascript
.
'.js'
);
}
}
// Delete the JavaScript translations directory if empty.
if
(
!
file_scan_directory
(
$locale_js_directory
,
'/.*/'
))
{
rmdir
(
$locale_js_directory
);
}
}
// Delete the JavaScript translations directory if empty.
if
(
!
file_scan_directory
(
$locale_js_directory
,
'/.*/'
))
{
rmdir
(
$locale_js_directory
);
}
// Clear variables.
...
...
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