mirror of
https://github.com/Squidly271/community.applications.git
synced 2025-06-03 14:52:13 +08:00
Rerun setup action centre if installing a deprecated plugin
This commit is contained in:
parent
ad9ba81448
commit
5d9cb81591
Binary file not shown.
@ -158,6 +158,8 @@ data.searchFlag = false;
|
|||||||
data.searchActive = false; // Sets whether changepage re-sorts the displayed templates.
|
data.searchActive = false; // Sets whether changepage re-sorts the displayed templates.
|
||||||
data.previousAppsSection = ""; // The section the user is on within previous apps
|
data.previousAppsSection = ""; // The section the user is on within previous apps
|
||||||
data.searchInProgress = false;
|
data.searchInProgress = false;
|
||||||
|
data.deprecated = false; // Only set by reinstalling a deprecated plugin
|
||||||
|
|
||||||
var dockerNotEnabled;
|
var dockerNotEnabled;
|
||||||
var postCount = 0;
|
var postCount = 0;
|
||||||
var cookieWarning = false;
|
var cookieWarning = false;
|
||||||
@ -1114,6 +1116,7 @@ function closeSidebar(cookie=false,visible=false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function installPlugin(pluginURL,update=false,comment="") {
|
function installPlugin(pluginURL,update=false,comment="") {
|
||||||
|
alert(pluginURL);
|
||||||
type = update ? "update" : "install";
|
type = update ? "update" : "install";
|
||||||
title = update ? "<?tr("Update Plugin")?>" : "<?tr("Install Plugin")?>";
|
title = update ? "<?tr("Update Plugin")?>" : "<?tr("Install Plugin")?>";
|
||||||
closeSidebar(true);
|
closeSidebar(true);
|
||||||
@ -1137,6 +1140,11 @@ function installPlugin(pluginURL,update=false,comment="") {
|
|||||||
} else {
|
} else {
|
||||||
var postFunction = "OpenSidebarAndRefreshDisplay";
|
var postFunction = "OpenSidebarAndRefreshDisplay";
|
||||||
}
|
}
|
||||||
|
data.deprecated = false; // global var here to trigger a rescan of action centre
|
||||||
|
if ( pluginURL.includes("&deprecated") ) {
|
||||||
|
data.deprecated = true;
|
||||||
|
pluginURL.replace("&deprecated","");
|
||||||
|
}
|
||||||
openBox('/plugins/community.applications/scripts/pluginInstall.php&arg1='+type+'&arg2='+pluginURL,title,600,900,true,postFunction);
|
openBox('/plugins/community.applications/scripts/pluginInstall.php&arg1='+type+'&arg2='+pluginURL,title,600,900,true,postFunction);
|
||||||
} else {
|
} else {
|
||||||
enableSearch();
|
enableSearch();
|
||||||
@ -1148,6 +1156,11 @@ function installPlugin(pluginURL,update=false,comment="") {
|
|||||||
} else {
|
} else {
|
||||||
var postFunction = "OpenSidebarAndRefreshDisplay";
|
var postFunction = "OpenSidebarAndRefreshDisplay";
|
||||||
}
|
}
|
||||||
|
data.deprecated = false; // global var here to trigger a rescan of action centre
|
||||||
|
if ( pluginURL.includes("&deprecated") ) {
|
||||||
|
data.deprecated = true;
|
||||||
|
pluginURL.replace("&deprecated","");
|
||||||
|
}
|
||||||
openBox('/plugins/community.applications/scripts/pluginInstall.php&arg1='+type+'&arg2='+pluginURL,title,600,900,true,postFunction);
|
openBox('/plugins/community.applications/scripts/pluginInstall.php&arg1='+type+'&arg2='+pluginURL,title,600,900,true,postFunction);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1167,6 +1180,11 @@ function OpenSidebarAndRefreshDisplay() {
|
|||||||
if ( $.trim(apppath) ) {
|
if ( $.trim(apppath) ) {
|
||||||
showSidebarApp(apppath,appname);
|
showSidebarApp(apppath,appname);
|
||||||
}
|
}
|
||||||
|
if ( data.deprecated ) {
|
||||||
|
data.deprecated = false;
|
||||||
|
setupActionCentre();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
27e83831482abd3f3a30551ff06ada98 ./Apps.page
|
7f92a472f8e7bc8fc51db9778abc9ed5 ./Apps.page
|
||||||
4e55f7483b661af21a25b677179baffe ./CA_notices.page
|
4e55f7483b661af21a25b677179baffe ./CA_notices.page
|
||||||
42a1658a916a3a3eed2a9f2af80603c4 ./ca_settings.page
|
42a1658a916a3a3eed2a9f2af80603c4 ./ca_settings.page
|
||||||
e718d7825dbdc96a17a915079222b098 ./default.cfg
|
e718d7825dbdc96a17a915079222b098 ./default.cfg
|
||||||
@ -21,4 +21,4 @@ da3b4f9b73c5c3bf65be6c42d68b51f9 ./scripts/showStatistics.php
|
|||||||
34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php
|
34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php
|
||||||
ce8e45452d3b63b5943b6f39c817bbf9 ./skins/Narrow/css.php
|
ce8e45452d3b63b5943b6f39c817bbf9 ./skins/Narrow/css.php
|
||||||
c4d6ce8de3baff1c9de2b7f348b2f340 ./skins/Narrow/skin.html
|
c4d6ce8de3baff1c9de2b7f348b2f340 ./skins/Narrow/skin.html
|
||||||
07b1886782ee6418f82e0724d6ba8f6f ./skins/Narrow/skin.php
|
484b42f519e72726c857a9c9d19954d1 ./skins/Narrow/skin.php
|
||||||
|
@ -235,7 +235,8 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
|
|||||||
}
|
}
|
||||||
if ( ! $template['RequiresFile'] || ($template['RequiresFile'] && is_file($template['RequiresFile'])) ) {
|
if ( ! $template['RequiresFile'] || ($template['RequiresFile'] && is_file($template['RequiresFile'])) ) {
|
||||||
$installComment = $template['RequiresFile'] ? "" : $installComment;
|
$installComment = $template['RequiresFile'] ? "" : $installComment;
|
||||||
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>$buttonTitle,"action"=>"installPlugin('{$template['PluginURL']}','','".str_replace([" ","\n"],[" ",""],htmlspecialchars($installComment))."');");
|
$isDeprecated = $template['Deprecated'] ? "&deprecated" : "";
|
||||||
|
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>$buttonTitle,"action"=>"installPlugin('{$template['PluginURL']}$isDeprecated','','".str_replace([" ","\n"],[" ",""],htmlspecialchars($installComment))."');");
|
||||||
}
|
}
|
||||||
if ( $template['InstallPath'] ) {
|
if ( $template['InstallPath'] ) {
|
||||||
if ( ! empty($actionsContext) )
|
if ( ! empty($actionsContext) )
|
||||||
@ -662,7 +663,8 @@ function getPopupDescriptionSkin($appNumber) {
|
|||||||
if ( !$template['Deprecated'] || $caSettings['hideDeprecated'] !== "true" ) {
|
if ( !$template['Deprecated'] || $caSettings['hideDeprecated'] !== "true" ) {
|
||||||
if ( ($template['RequiresFile'] && is_file($template['RequiresFile']) ) || ! $template['RequiresFile'] ) {
|
if ( ($template['RequiresFile'] && is_file($template['RequiresFile']) ) || ! $template['RequiresFile'] ) {
|
||||||
$buttonTitle = $template['InstallPath'] ? tr("Reinstall") : tr("Install");
|
$buttonTitle = $template['InstallPath'] ? tr("Reinstall") : tr("Install");
|
||||||
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>$buttonTitle,"action"=>"installPlugin('{$template['PluginURL']}');");
|
$isDeprecated = $template['Deprecated'] ? "&deprecated" : "";
|
||||||
|
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>$buttonTitle,"action"=>"installPlugin('{$template['PluginURL']}$isDeprecated');");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user