Subversion Repositories oidplus

Rev

Rev 597 | Rev 632 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 597 Rev 624
Line 44... Line 44...
44
 
44
 
45
$all_strings = array();
45
$all_strings = array();
46
 
46
 
47
$it = new RecursiveDirectoryIterator($dir);
47
$it = new RecursiveDirectoryIterator($dir);
48
foreach(new RecursiveIteratorIterator($it) as $file) {
48
foreach(new RecursiveIteratorIterator($it) as $file) {
49
        if (strpos(str_replace('\\','/',realpath($file)),'/vendor/') !== false) continue; // ignore third-party-code
49
        if ((strpos(str_replace('\\','/',realpath($file)),'/vendor/') !== false) && (strpos(str_replace('\\','/',realpath($file)),'/vendor/danielmarschall/') === false)) continue; // ignore third-party-code
50
        if (strpos(str_replace('\\','/',realpath($file)),'/dev/') !== false) continue; // ignore development utilities
50
        if (strpos(str_replace('\\','/',realpath($file)),'/dev/') !== false) continue; // ignore development utilities
51
        if ($file->getExtension() == 'php') {
51
        if ($file->getExtension() == 'php') {
52
                $cont = file_get_contents($file);
52
                $cont = file_get_contents($file);
53
                $cont = phpRemoveComments($cont);
53
                $cont = phpRemoveComments($cont);
54
                $cont = str_replace('function _L($str, ...$sprintfArgs) {', '', $cont);
54
#               $cont = str_replace('function _L($str, ...$sprintfArgs) {', '', $cont);
-
 
55
                $cont = str_replace('_L($', '', $cont);
55
                $strings = get_php_L_strings($cont);
56
                $strings = get_php_L_strings($cont);
56
                $strings_test = get_js_L_strings($cont);
57
                $strings_test = get_js_L_strings($cont);
57
 
58
 
58
                if (serialize($strings) != serialize($strings_test)) {
59
                if (serialize($strings) != serialize($strings_test)) {
59
                        echo "Attention: File ".realpath($file)." ambiguous _L() functions\n";
60
                        echo "Attention: File ".realpath($file)." ambiguous _L() functions\n";