Topic: Language selection displays 'hidden' folders.
For those of us who keep PunBB in Subversion, the .svn directory inside of lang/ appears as a language in the drop-down inside the profile editing page, the registration page, and the administrative options page. A simple fix is to exclude .svn (or .cvs or .whatever) from the language list:
Index: admin_options.php
===================================================================
--- admin_options.php (revision 14)
+++ admin_options.php (working copy)
@@ -222,7 +222,7 @@
$d = dir(PUN_ROOT.'lang');
while (($entry = $d->read()) !== false)
{
- if ($entry != '.' && $entry != '..' && is_dir(PUN_ROOT.'lang/'.$entry))
+ if ($entry != '.' && $entry != '..' && $entry != '.svn' && is_dir(PUN_ROOT.'lang/'.$entry))
$languages[] = $entry;
}
$d->close();
Index: register.php
===================================================================
--- register.php (revision 14)
+++ register.php (working copy)
@@ -337,7 +337,7 @@
$d = dir(PUN_ROOT.'lang');
while (($entry = $d->read()) !== false)
{
- if ($entry != '.' && $entry != '..' && is_dir(PUN_ROOT.'lang/'.$entry))
+ if ($entry != '.' && $entry != '..' && $entry != '.svn' && is_dir(PUN_ROOT.'lang/'.$entry))
$languages[] = $entry;
}
$d->close();
Index: profile.php
===================================================================
--- profile.php (revision 14)
+++ profile.php (working copy)
@@ -1129,7 +1129,7 @@
$d = dir(PUN_ROOT.'lang');
while (($entry = $d->read()) !== false)
{
- if ($entry != '.' && $entry != '..' && is_dir(PUN_ROOT.'lang/'.$entry))
+ if ($entry != '.' && $entry != '..' && $entry != '.svn' && is_dir(PUN_ROOT.'lang/'.$entry))
$languages[] = $entry;
}
$d->close();
Obviously, it would be cleaner to just ignore any directory whose name begins with a . but the above code works just fine for me.
Over 2300 users and 265,000 posts, running PunBB for 3 years