fantu
2008-11-17 c2d9267b5a485585a108c0ba6d1dce6afc34982e
- Improved merge in language: add remove of line how not exists in master language
2 files modified
15 ■■■■■ changed files
TODO.txt 5 ●●●●● patch | view | raw | blame | history
interface/web/admin/language_complete.php 10 ●●●●● patch | view | raw | blame | history
TODO.txt
@@ -88,8 +88,3 @@
- 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
@@ -112,6 +112,14 @@
                $n++;
            }
        }
        $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) {
@@ -122,6 +130,8 @@
        $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 />";