mirror of
https://github.com/ThunixdotNet/www.git
synced 2026-01-24 07:10:18 +00:00
Do not list empty directory
This commit is contained in:
@@ -4,6 +4,7 @@ print "<ul style='list-style: none; margin-left: -40px;'>";
|
|||||||
foreach (glob("/home/*") as $user):
|
foreach (glob("/home/*") as $user):
|
||||||
if (is_dir($user . "/public_html"))
|
if (is_dir($user . "/public_html"))
|
||||||
if (!file_exists($user . "/public_html/coming_soon"))
|
if (!file_exists($user . "/public_html/coming_soon"))
|
||||||
|
if (count(scandir($user."/public_html")) != 2)
|
||||||
{
|
{
|
||||||
$user = basename($user);
|
$user = basename($user);
|
||||||
print"<li><a href='$site_root/~$user/'>~$user</a></li>";
|
print"<li><a href='$site_root/~$user/'>~$user</a></li>";
|
||||||
|
|||||||
Reference in New Issue
Block a user