Commit 41122ee 1 parent 24ccb72 commit 41122ee Copy full SHA for 41122ee
File tree 5 files changed +15
-5
lines changed
5 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,10 @@ function getAllFlags() {
38
38
function getEnabledLangs () {
39
39
global $ global ;
40
40
$ dir = "{$ global ['systemRootPath ' ]}locale " ;
41
- $ flags = array ('us ' );
41
+ $ flags = array ();
42
+ if (empty ($ global ['dont_show_us_flag ' ])){
43
+ $ flags [] = 'us ' ;
44
+ }
42
45
if ($ handle = opendir ($ dir )) {
43
46
while (false !== ($ entry = readdir ($ handle ))) {
44
47
if ($ entry != ". " && $ entry != ".. " && $ entry != "index.php " && $ entry != "function.php " && $ entry != "save.php " ) {
Original file line number Diff line number Diff line change @@ -131,6 +131,9 @@ function getWebSiteTitle() {
131
131
}
132
132
133
133
function getLanguage () {
134
+ if ($ this ->language == "en " ){
135
+ return "us " ;
136
+ }
134
137
return $ this ->language ;
135
138
}
136
139
Original file line number Diff line number Diff line change 1
1
<?php
2
- ini_set ('error_log ' , $ global ['systemRootPath ' ].'videos/youphptube.log ' );
2
+ ini_set ('error_log ' , $ global ['systemRootPath ' ].'videos/youphptube.log ' );
3
+ global $ global ;
4
+ $ global ['dont_show_us_flag ' ] = false ;
Original file line number Diff line number Diff line change 2
2
require_once $ global ['systemRootPath ' ] . 'objects/user.php ' ;
3
3
require_once $ global ['systemRootPath ' ] . 'objects/category.php ' ;
4
4
$ categories = Category::getAllCategories ();
5
-
6
5
if (empty ($ _SESSION ['language ' ])) {
7
- $ lang = 'en ' ;
6
+ $ lang = 'us ' ;
8
7
} else {
9
8
$ lang = $ _SESSION ['language ' ];
10
9
}
59
58
$ flags = getEnabledLangs ();
60
59
foreach ($ flags as $ value ) {
61
60
$ selected = "" ;
61
+ if ($ value == 'en ' ){
62
+ $ value = 'us ' ;
63
+ }
62
64
if ($ lang == $ value ) {
63
65
$ selected = 'selected="selected" ' ;
64
66
}
Original file line number Diff line number Diff line change 1
1
<?php
2
- if (!file_exists ('../videos/configuration.php ' )) {
2
+ if (!file_exists ('../videos/configuration.php ' )) {
3
3
if (!file_exists ('../install/index.php ' )) {
4
4
die ("No Configuration and no Installation " );
5
5
}
You can’t perform that action at this time.
0 commit comments