File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131$ eoldata = json_decode (file_get_contents ('https://endoflife.date/api/windows.json ' ), true );
3232$ validversions = '' ;
3333$ latestver = '' ;
34- $ found10 = false ;
3534$ found11 = false ;
3635
3736// Set Latest Version
3837foreach ($ eoldata as $ eolitem ) {
39- // Windows 10
40- if (!(bool ) $ eolitem ['lts ' ]
41- && !str_contains ($ eolitem ['cycle ' ], '-e ' )
42- && str_contains ($ eolitem ['cycle ' ], '10 ' )
43- && $ found10 === false ) {
44- $ latestver = $ latestver . $ eolitem ['latest ' ] . ' ' ;
45- $ found10 = true ;
46- }
47-
4838 // Windows 11
4939 if (!(bool ) $ eolitem ['lts ' ]
5040 && !str_contains ($ eolitem ['cycle ' ], '-e ' )
5141 && str_contains ($ eolitem ['cycle ' ], '11 ' )
52- && $ found11 == false ) {
42+ && $ found11 == false
43+ && !str_contains ($ eolitem ['latest ' ], '10.0.28000 ' )) {
5344 $ latestver = $ latestver . $ eolitem ['latest ' ] . ' ' ;
5445 $ found11 = true ;
5546 }
5647
5748 // Break out of loop
58- if ($ found10 == true && $ found11 == true ) {
49+ if ($ found11 == true ) {
5950 break ;
6051 }
6152}
You can’t perform that action at this time.
0 commit comments