Move repo download /update in to ajax backend code + added a button to check for updates

This commit is contained in:
Eric Schultz
2016-01-24 12:53:58 -06:00
parent 8e43a369fa
commit 5829a900e3
3 changed files with 12 additions and 12 deletions

View File

@ -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 = [];