mirror of
https://github.com/Squidly271/community.applications.git
synced 2025-06-03 14:52:13 +08:00
Added: check for updates button
This commit is contained in:
parent
565fe0bb94
commit
c28dfddeac
Binary file not shown.
@ -395,7 +395,6 @@ $(function(){
|
||||
installPlugin(plugin,type);
|
||||
});
|
||||
|
||||
|
||||
$("body").on("click",".uninstallApp",function() {
|
||||
var type = $(this).data("type");
|
||||
var name = $(this).data("name");
|
||||
@ -636,6 +635,11 @@ $(function(){
|
||||
$(".multi_installAll").click(function() { selectAllPrevious(); enableMultiInstall(); });
|
||||
$(".startupButton").click(function() { $(".maxPerPage").hide();hideSortIcons();updateContent(this); });
|
||||
|
||||
$(".checkForUpdatesButton").click(function() {
|
||||
openBox('/plugins/<?=$plugin?>/scripts/checkForUpdates.sh',tr('Check For Updates'),600,1100,true,"postCheckForUpdates");
|
||||
});
|
||||
|
||||
|
||||
$(".multi_installButton").click(function() {
|
||||
if ( $(".multi_installButton").hasClass("actionCenter") ) {
|
||||
updateMulti();
|
||||
@ -2931,6 +2935,12 @@ function setupActionCentre() {
|
||||
$(".actionCentre").hide();
|
||||
});
|
||||
}
|
||||
|
||||
function postCheckForUpdates() {
|
||||
alert("got here");
|
||||
setupActionCentre();
|
||||
refreshDisplay();
|
||||
}
|
||||
</script>
|
||||
|
||||
<?include "/usr/local/emhttp/plugins/$plugin/skins/Narrow/skin.html"?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
d44ba1953e1f99edfadac123401c938a ./Apps.page
|
||||
2faae5a00e9cbfb73002febd04a1b0d0 ./Apps.page
|
||||
4e55f7483b661af21a25b677179baffe ./CA_notices.page
|
||||
42a1658a916a3a3eed2a9f2af80603c4 ./ca_settings.page
|
||||
e718d7825dbdc96a17a915079222b098 ./default.cfg
|
||||
@ -7,7 +7,8 @@ e564b860fa0d5022df83c103922665d7 ./include/helpers.php
|
||||
fc87642746ba4f324537bc381b78e982 ./include/paths.php
|
||||
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
|
||||
71f911a818d88d3d567f8a2898094ee2 ./README.md
|
||||
06d41d04294a4cc64130003083e2dd4a ./scripts/checkForUpdates.php
|
||||
d3d8286046cc7d6edf8f596067c163a2 ./scripts/checkForUpdates.php
|
||||
99a9d58a49a7f6812f18bd4be2b563b9 ./scripts/checkForUpdates.sh
|
||||
677ac9a29993ec57e09ec6a1856f1a11 ./scripts/dockerConvert.php
|
||||
07684bde8ccd13523f62c69bb492fc27 ./scripts/installMulti.php
|
||||
e54e7ec1cbc312c11900977181b71380 ./scripts/installMultiPlugin.php
|
||||
|
@ -7,30 +7,33 @@
|
||||
# #
|
||||
###############################################################
|
||||
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: "/usr/local/emhttp";
|
||||
echo $docroot;
|
||||
|
||||
$_SERVER['REQUEST_URI'] = "docker/apps";
|
||||
@require_once "$docroot/plugins/dynamix/include/Translations.php";
|
||||
require_once "$docroot/plugins/community.applications/include/paths.php";
|
||||
require_once "$docroot/plugins/community.applications/include/helpers.php";
|
||||
|
||||
if ( is_file($caPaths['updateRunning']) && file_exists("/proc/".@file_get_contents($caPaths['updateRunning'])) ) {
|
||||
echo "Check for updates already running\n";
|
||||
echo tr("Check for updates already running")."\n";
|
||||
exit();
|
||||
}
|
||||
|
||||
file_put_contents($caPaths['updateRunning'],getmypid());
|
||||
|
||||
$updateFile = is_file("$docroot/plugins/dynamix.docker.manager/scripts/dockerupdate") ? "dockerupdate" : "dockerupdate.php";
|
||||
echo "Checking for docker container updates\n";
|
||||
echo tr("Checking for docker container updates")."\n";
|
||||
exec("$docroot/plugins/dynamix.docker.manager/scripts/dockerupdate check nonotify > /dev/null 2>&1");
|
||||
echo "Checking for plugin updates\n";
|
||||
echo tr("Checking for plugin updates")."\n";
|
||||
foreach (glob("/var/log/plugins/*.plg") as $plg) {
|
||||
if ( $plg == "/var/log/plugins/community.applications.plg" || $plg == "unRAIDServer.plg" || $plg == "gui.search.plg" || $plg == "page.notes.plg")
|
||||
continue; // avoid possible race condition since CA / gui.search automatically check for updates for themselves when on Apps tab
|
||||
echo "Checking $plg\n";
|
||||
echo sprintf(tr("Checking %s"),$plg)."\n";
|
||||
exec("$docroot/plugins/dynamix.plugin.manager/scripts/plugin check ".escapeshellarg(basename($plg))." > /dev/null 2>&1");
|
||||
}
|
||||
echo "Checking for language updates\n";
|
||||
echo tr("Checking for language updates")."\n";
|
||||
foreach (glob("/var/log/plugins/lang-*.xml") as $lang) {
|
||||
$lingo = str_replace(["lang-",".xml"],["",""],$lang);
|
||||
echo "Checking ".basename($lingo)."\n";
|
||||
echo sprintf(tr("Checking %s"),basename($lingo))."\n";
|
||||
exec("$docroot/plugins/dynamix.plugin.manager/scripts/language check ".basename($lingo));
|
||||
}
|
||||
@unlink($caPaths['updateRunning']);
|
||||
|
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
/usr/local/emhttp/plugins/community.applications/scripts/checkForUpdates.php
|
||||
|
Loading…
x
Reference in New Issue
Block a user