mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Added TorrentPier files integrity check 📦 (#1491)
* Added file integrity check 📦
* Update CHANGELOG.md
* Update CHANGELOG.md
* Updated
* Update Common.php
* Updated
* Update board_maintenance.php
* Update index.tpl
* Updated
* Updated
* Update build_check_updates.php
* Update build_check_updates.php
* Update build_check_updates.php
* Update build_check_updates.php
* Update build_check_updates.php
* Update index.php
* Updated
* Update build_check_updates.php
* Update build_files_integrity.php
* Update build_files_integrity.php
* Update build_files_integrity.php
* Create checksums.md5
* Update build_files_integrity.php
* Update build_files_integrity.php
* Updated
* Update checksums.md5
* Update defines.php
* Update build_files_integrity.php
* Updated
* Update main.php
* Update main.php
* Update main.php
* Update index.tpl
* Update index.tpl
* Update index.php
* Update build_check_updates.php
* Update build_check_updates.php
* Update checksums.md5
* Update build_files_integrity.php
* Update checksums.md5
This commit is contained in:
parent
3db9095b78
commit
437c2e5d8d
12 changed files with 2614 additions and 4 deletions
|
@ -15,6 +15,12 @@ if (!$stats = $datastore->get('stats')) {
|
|||
$stats = $datastore->get('stats');
|
||||
}
|
||||
|
||||
// Files integrity check
|
||||
if (!$files_integrity_data = $datastore->get('files_integrity')) {
|
||||
$datastore->update('files_integrity');
|
||||
$files_integrity_data = $datastore->get('files_integrity');
|
||||
}
|
||||
|
||||
// Check for updates
|
||||
if (!$update_data = $datastore->get('check_updates')) {
|
||||
$datastore->update('check_updates');
|
||||
|
@ -82,8 +88,18 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left') {
|
|||
'ADMIN_LOCK_CRON' => is_file(BB_DISABLED),
|
||||
]);
|
||||
|
||||
// Files integrity check results
|
||||
if (!empty($files_integrity_data)) {
|
||||
$template->assign_block_vars('integrity_check', [
|
||||
'INTEGRITY_SUCCESS' => (bool)$files_integrity_data['success'],
|
||||
'INTEGRITY_WRONG_FILES_LIST' => implode("\n</li>\n<li>\n", $files_integrity_data['wrong_files']),
|
||||
'INTEGRITY_LAST_CHECK_TIME' => sprintf($lang['INTEGRITY_LAST_CHECK'], bb_date($files_integrity_data['timestamp'])),
|
||||
'INTEGRITY_CHECKED_FILES' => sprintf($lang['INTEGRITY_CHECKED'], $files_integrity_data['total_num'], ($files_integrity_data['total_num'] - $files_integrity_data['wrong_files_num'])),
|
||||
]);
|
||||
}
|
||||
|
||||
// Check for updates
|
||||
if (!empty($update_data)) {
|
||||
if (isset($update_data['available_update'])) {
|
||||
$template->assign_block_vars('updater', [
|
||||
'UPDATE_AVAILABLE' => $update_data['available_update'],
|
||||
'NEW_VERSION_NUMBER' => $update_data['latest_version'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue