Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
c2d9267b
Commit
c2d9267b
authored
Nov 17, 2008
by
fantu
Browse files
- Improved merge in language: add remove of line how not exists in master language
parent
fa5f9135
Changes
2
Show whitespace changes
Inline
Side-by-side
TODO.txt
View file @
c2d9267b
...
...
@@ -88,8 +88,3 @@ General tasks
- Add, extend or modify comments in PEAR syntax so that they can be read with phpdocumentor.
Language editor
--------------------------------------
- Merge: remove the line how exists in language to merge but not in main (removed in main because not use or change for fix)
interface/web/admin/language_complete.php
View file @
c2d9267b
...
...
@@ -113,6 +113,14 @@ function merge_langfile($langfile,$masterfile) {
}
}
$r
=
0
;
foreach
(
$wb
as
$key
=>
$val
)
{
if
(
!
isset
(
$wb_master
[
$key
]))
{
unset
(
$wb
[
$key
]);
$r
++
;
}
}
$file_content
=
"<?php
\n
"
;
foreach
(
$wb
as
$key
=>
$val
)
{
$val
=
str_replace
(
"'"
,
''
,
$val
);
...
...
@@ -122,6 +130,8 @@ function merge_langfile($langfile,$masterfile) {
$file_content
.
=
"?>
\n
"
;
$msg
.
=
"Added
$n
lines to the file
$langfile
<br />"
;
if
(
$r
!=
0
)
$msg
.
=
"Removed
$r
lines to the file
$langfile
<br />"
;
file_put_contents
(
$langfile
,
$file_content
);
}
else
{
$msg
.
=
"File does not exist yet. Copied file
$masterfile
to
$langfile
<br />"
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment