Move repo download /update in to ajax backend code + added a button to check for updates
This commit is contained in:
@ -1,5 +1,12 @@
|
||||
<?php
|
||||
require_once '/usr/local/emhttp/plugins/NerdPack/include/NerdPackHelpers.php';
|
||||
require_once '/usr/local/emhttp/plugins/NerdPack/include/DownloadHelpers.php';
|
||||
|
||||
// Only download repo update if the current one is 1 hour old or more
|
||||
if (!is_file($repo_file) || !empty($_GET['force']) || (filemtime($repo_file) < (time() - 3600))) {
|
||||
get_content_from_github($pkg_repo, $repo_file);
|
||||
get_content_from_github($pkg_desc, $desc_file);
|
||||
}
|
||||
|
||||
$pkgs_array = [];
|
||||
|
||||
|
Reference in New Issue
Block a user