mirror of https://github.com/tildeclub/site.git
Update index.php
This commit is contained in:
parent
f1c971e910
commit
4c7113dd74
10
index.php
10
index.php
|
@ -204,9 +204,12 @@ if (isset($_GET['notice'])) {
|
||||||
];
|
];
|
||||||
$oneMonthAgo = strtotime('-1 month');
|
$oneMonthAgo = strtotime('-1 month');
|
||||||
|
|
||||||
foreach (glob("/home/*") as $user) {
|
foreach (glob("/home/*") as $user) {
|
||||||
$index = "$user/public_html/index.html";
|
// Look for index files with common extensions
|
||||||
if (!file_exists($index) || in_array(sha1_file($index), $page_shas)) continue;
|
$indexFiles = glob("$user/public_html/index.{html,htm,php}", GLOB_BRACE);
|
||||||
|
$index = count($indexFiles) > 0 ? $indexFiles[0] : null;
|
||||||
|
|
||||||
|
if (!$index || in_array(sha1_file($index), $page_shas)) continue;
|
||||||
|
|
||||||
// Check for any recent changes in the public_html directory
|
// Check for any recent changes in the public_html directory
|
||||||
$recentChange = false;
|
$recentChange = false;
|
||||||
|
@ -216,6 +219,7 @@ if (isset($_GET['notice'])) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$user = basename($user);
|
$user = basename($user);
|
||||||
$class = $recentChange ? 'recently-updated' : '';
|
$class = $recentChange ? 'recently-updated' : '';
|
||||||
|
|
Loading…
Reference in New Issue