spaces
parent
e27e7fc105
commit
f5594a52af
Binary file not shown.
|
@ -544,9 +544,9 @@ $(function(){
|
|||
if ( $(this).hasClass("caMenuDisabled") ) {
|
||||
return;
|
||||
}
|
||||
if ( $(this).attr("onclick") )
|
||||
if ( $(this).attr("onclick") )
|
||||
return;
|
||||
|
||||
|
||||
var slideFlag = true;
|
||||
var currentCat = $(".selectedMenu").data("category");
|
||||
var newCat = $(this).data("category");
|
||||
|
@ -740,7 +740,7 @@ $(function(){
|
|||
});
|
||||
<?endif;?>
|
||||
/* Everything is now initialized. This is the start of the actual "real" code */
|
||||
|
||||
|
||||
if ( "<?=$firstRun?>" == "true" ) {
|
||||
$(".ca_templatesDisplay").hide();
|
||||
swal({
|
||||
|
@ -827,7 +827,7 @@ function showSortIcons() {
|
|||
}
|
||||
<?if ($nchanCom):?>
|
||||
function ca_openPlugin(cmd,title,plg,func) {
|
||||
setTimeout(function(){openPlugin(cmd,title,plg,func,"");},250);
|
||||
setTimeout(function(){openPlugin(cmd,title,plg,func,"");},250);
|
||||
}
|
||||
<?endif;?>
|
||||
|
||||
|
@ -871,7 +871,7 @@ function updateContent(button) {
|
|||
<?else:?>
|
||||
openBox('/plugins/<?=$plugin?>/scripts/installMultiPlugin.php&arg1='+plugins,"<?tr('Install Plugin Applications')?>",600,900,true);
|
||||
<?endif;?>
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1264,7 +1264,7 @@ function actuallyInstallPlugin(pluginURL,update=false,comment="") {
|
|||
}
|
||||
<?if ($nchanCom):?>
|
||||
post({action:'saveMultiPluginPending',plugin:pluginURL},function(data) {
|
||||
ca_openPlugin('plugin '+type+' '+pluginURL,title,'',postFunction);
|
||||
ca_openPlugin('plugin '+type+' '+pluginURL,title,'',postFunction);
|
||||
});
|
||||
<?else:?>
|
||||
openBox('/plugins/community.applications/scripts/pluginInstall.php&arg1='+type+'&arg2='+pluginURL,title,600,900,true,postFunction);
|
||||
|
@ -1275,7 +1275,7 @@ function actuallyInstallPlugin(pluginURL,update=false,comment="") {
|
|||
});
|
||||
} else {
|
||||
hidePluginPending(pluginURL);
|
||||
|
||||
|
||||
if ( $(".selectedMenu").data("category") == "action_centre" ) {
|
||||
var postFunction = "actionCentre";
|
||||
} else {
|
||||
|
@ -1316,14 +1316,14 @@ function hideLanguagePending(language) {
|
|||
language = language.replace(".xml","");
|
||||
if ( ! language )
|
||||
return;
|
||||
|
||||
|
||||
$(".actionsButton").each(function() {
|
||||
if ( $(this).data("languagepack") == language ) {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function OpenSidebarAndRefreshDisplay() {
|
||||
post({action:"onStartupScreen"},function(result) {
|
||||
if (result.status) {
|
||||
|
@ -2955,7 +2955,7 @@ function showRepoPopup(repository) {
|
|||
}
|
||||
var sidebarAppName = $.cookie("sidebarAppName");
|
||||
var sidebarAppPath = $.cookie("sidebarAppPath");
|
||||
|
||||
|
||||
$("#sidenavContent").html("");
|
||||
|
||||
$(".sidenav").removeClass("sidenavHide").addClass("sidenavShow");
|
||||
|
@ -2988,7 +2988,7 @@ function showRepoPopup(repository) {
|
|||
$('body').removeClass("dimScreenShot");
|
||||
$(".sidebar").show();
|
||||
$.cookie("sidebarAppName",sidebarAppName,{path:"/;SameSite=Lax"});
|
||||
$.cookie("sidebarAppPath",sidebarAppPath,{path:"/;SameSite=Lax"});
|
||||
$.cookie("sidebarAppPath",sidebarAppPath,{path:"/;SameSite=Lax"});
|
||||
showRepoPopup(data.repository);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
f46a879703bf0c5bc2df1d9e644d4779 ./Apps.page
|
||||
1bae65306743fa52da3bb262f0304bcf ./Apps.page
|
||||
106b521c1feebda4d7b3f558cc016cda ./CA_notices.page
|
||||
eb1f0ee4148747c0473e73e4e973994f ./ca_settings.page
|
||||
e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg
|
||||
f08af697fd10fc424f29437b655d735f ./include/exec.php
|
||||
6a2cd1927d391aff2345233a514d7a87 ./include/helpers.php
|
||||
451cc69d66e2504aa3e9977cb2e233b8 ./include/exec.php
|
||||
1182f793790a06f0d8ac38674904ec76 ./include/helpers.php
|
||||
8e053d6cd83fbe2202c13b692beabb4f ./include/paths.php
|
||||
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
|
||||
71f911a818d88d3d567f8a2898094ee2 ./README.md
|
||||
|
|
|
@ -239,7 +239,7 @@ function DownloadApplicationFeed() {
|
|||
continue;
|
||||
}
|
||||
$o = addMissingVars($o);
|
||||
|
||||
|
||||
if ( $o['CategoryList'] ) {
|
||||
foreach ($o['CategoryList'] as $cat) {
|
||||
$cat = str_replace("-",":",$cat);
|
||||
|
@ -331,7 +331,7 @@ function DownloadApplicationFeed() {
|
|||
|
||||
$ApplicationFeed['repositories'][$o['RepoName']]['downloads'] = $ApplicationFeed['repositories'][$o['RepoName']]['downloads'] ?? 0;
|
||||
$ApplicationFeed['repositories'][$o['RepoName']]['trending'] = $ApplicationFeed['repositories'][$o['RepoName']]['trending'] ?? 0;
|
||||
|
||||
|
||||
$ApplicationFeed['repositories'][$o['RepoName']]['downloads']++;
|
||||
$ApplicationFeed['repositories'][$o['RepoName']]['trending'] += $o['trending'];
|
||||
if ( ! $o['ModeratorComment'] == "Duplicated Template" ) {
|
||||
|
@ -494,7 +494,7 @@ function appOfDay($file) {
|
|||
|
||||
$max = 12;
|
||||
$appOfDay = null;
|
||||
|
||||
|
||||
switch ($caSettings['startup']) {
|
||||
case "random":
|
||||
$oldAppDay = @filemtime($caPaths['appOfTheDay']);
|
||||
|
@ -592,7 +592,7 @@ function appOfDay($file) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case "featured":
|
||||
case "featured":
|
||||
$containers = getAllInfo();
|
||||
$sortOrder['sortBy'] = "Featured";
|
||||
$sortOrder['sortDir'] = "Down";
|
||||
|
@ -600,7 +600,7 @@ function appOfDay($file) {
|
|||
foreach($file as $template) {
|
||||
if ( ! isset($template['Featured'] ) )
|
||||
break;
|
||||
if ( ! checkRandomApp($template) )
|
||||
if ( ! checkRandomApp($template) )
|
||||
continue;
|
||||
// Don't show it if the plugin is installed
|
||||
if ( $template['PluginURL'] && is_file("/var/log/plugins/".basename($template['PluginURL'])) )
|
||||
|
@ -615,9 +615,9 @@ function appOfDay($file) {
|
|||
$selected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( $selected )
|
||||
if ( $selected )
|
||||
continue;
|
||||
}
|
||||
$appOfDay[] = $template['ID'];
|
||||
|
@ -814,13 +814,13 @@ function get_content() {
|
|||
$o['display'] = "";
|
||||
foreach ($startupTypes as $type) {
|
||||
$display = [];
|
||||
|
||||
|
||||
$caSettings['startup'] = $type['type'];
|
||||
$appsOfDay = appOfDay($file);
|
||||
|
||||
if ( ! $appsOfDay || empty($appsOfDay) )
|
||||
continue;
|
||||
|
||||
|
||||
for ($i=0;$i<$caSettings['maxPerPage'];$i++) {
|
||||
if ( ! isset($appsOfDay[$i])) continue;
|
||||
$file[$appsOfDay[$i]]['NewApp'] = ($caSettings['startup'] != "random");
|
||||
|
@ -1499,7 +1499,7 @@ function displayTags() {
|
|||
###########################################
|
||||
function statistics() {
|
||||
global $caPaths, $caSettings;
|
||||
|
||||
|
||||
@unlink($caPaths['community-templates-displayed']);
|
||||
@unlink($caPaths['community-templates-allSearchResults']);
|
||||
@unlink($caPaths['community-templates-catSearchResults']);
|
||||
|
@ -1515,7 +1515,7 @@ function statistics() {
|
|||
pluginDupe();
|
||||
$invalidXML = readJsonFile($caPaths['invalidXML_txt']);
|
||||
$statistics['blacklist'] = $statistics['plugin'] = $statistics['docker'] = $statistics['private'] = $statistics['totalDeprecated'] = $statistics['totalIncompatible'] = $statistics['official'] = $statistics['invalidXML'] = 0;
|
||||
|
||||
|
||||
foreach ($templates as $template) {
|
||||
if ( ($template['Deprecated']??false) && ! ($template['Blacklist']??false) && ! ($template['BranchID']??false)) $statistics['totalDeprecated']++;
|
||||
|
||||
|
@ -1904,7 +1904,7 @@ function createXML() {
|
|||
if ( is_array($config['@attributes']) ) {
|
||||
if ( $config['@attributes']['Type'] == "Path" ) {
|
||||
$defaultReferenced = array_values(array_filter(explode("/",$config['@attributes']['Default'])));
|
||||
|
||||
|
||||
if ( isset($defaultReferenced[0]) && isset($defaultReferenced[1]) ) {
|
||||
if ( $defaultReferenced[0] == "mnt" && $defaultReferenced[1] && ! in_array($defaultReferenced[1],$disksPresent) )
|
||||
$config['@attributes']['Default'] = str_replace("/mnt/{$defaultReferenced[1]}/","/mnt/{$disksPresent[0]}/",$config['@attributes']['Default']);
|
||||
|
@ -1915,7 +1915,7 @@ function createXML() {
|
|||
if ( $valueReferenced[0] == "mnt" && $valueReferenced[1] && ! in_array($valueReferenced[1],$disksPresent) )
|
||||
$config['value'] = str_replace("/mnt/{$valueReferenced[1]}/","/mnt/{$disksPresent[0]}/",$config['value']);
|
||||
}
|
||||
|
||||
|
||||
// Check for pre-existing folders only differing by "case" and adjust accordingly
|
||||
|
||||
// Default path
|
||||
|
@ -2407,7 +2407,7 @@ function enableActionCentre() {
|
|||
if ( $runningflag ) {
|
||||
$tmpRepo = strpos($o['Repository'],":") ? $o['Repository'] : $o['Repository'].":latest";
|
||||
$tmpRepo = strpos($tmpRepo,"/") ?: "library/$tmpRepo";
|
||||
|
||||
|
||||
if ( $tmpRepo ) {
|
||||
if ( isset($dockerUpdateStatus[$tmpRepo]['status']) && $dockerUpdateStatus[$tmpRepo]['status'] == "false" )
|
||||
$o['actionCentre'] = true;
|
||||
|
@ -2528,12 +2528,12 @@ function downloadStatistics() {
|
|||
###########################################################################
|
||||
function checkPluginInProgress() {
|
||||
global $caPaths;
|
||||
|
||||
|
||||
$pluginsPending = glob("{$caPaths['pluginPending']}/*");
|
||||
|
||||
|
||||
postReturn(['inProgress'=>empty($pluginsPending)? "" : "true"]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#######################################
|
||||
# Logs Javascript errors being caught #
|
||||
|
|
|
@ -66,7 +66,7 @@ function writeJsonFile($filename,$jsonArray) {
|
|||
|
||||
function ca_file_put_contents($filename,$data,$flags=0) {
|
||||
$result = @file_put_contents($filename,$data,$flags);
|
||||
|
||||
|
||||
if ( $result === false ) {
|
||||
debug("Failed to write to $filename");
|
||||
$GLOBALS['script'] = "alert('Failed to write to ".htmlentities($filename,ENT_QUOTES)."');";
|
||||
|
@ -270,7 +270,7 @@ function makeXML($template) {
|
|||
# Sanitize the Requires entry if there is any CA links within it
|
||||
if ($template['Requires'] ?? false) {
|
||||
preg_match_all("/\/\/(.*?)\/m",$template['Requires'],$searchMatches);
|
||||
|
||||
|
||||
if ( isset($searchMatches[1]) && count($searchMatches[1]) ) {
|
||||
foreach ($searchMatches[1] as $searchResult) {
|
||||
$template['Requires'] = str_replace("//$searchResult\\\\",$searchResult,$template['Requires']);
|
||||
|
@ -584,7 +584,7 @@ function postReturn($retArray) {
|
|||
if (is_array($retArray)) {
|
||||
if ( isset($GLOBALS['script']) )
|
||||
$retArray['globalScript'] = $GLOBALS['script'];
|
||||
|
||||
|
||||
echo json_encode($retArray);
|
||||
} else
|
||||
echo $retArray;
|
||||
|
@ -655,7 +655,7 @@ function getAllInfo($force=false) {
|
|||
global $caSettings, $DockerTemplates, $DockerClient, $caPaths;
|
||||
|
||||
$containers = readJsonFile($caPaths['info']);
|
||||
|
||||
|
||||
if ( $force || ! $containers || empty($containers) ) {
|
||||
if ( $caSettings['dockerRunning'] ?? false ) {
|
||||
$info = $DockerTemplates->getAllInfo(false,true,true);
|
||||
|
@ -718,7 +718,7 @@ function portsUsed($template) {
|
|||
########################
|
||||
function getPortsInUse() {
|
||||
global $var, $caPaths;
|
||||
|
||||
|
||||
$addr = null;
|
||||
if ( !$var )
|
||||
$var = parse_ini_file($caPaths['unRaidVars']);
|
||||
|
@ -750,7 +750,7 @@ function plain($ip) {
|
|||
# Adds in all the various missing entries from the templates for PHP8 compliance #
|
||||
##################################################################################
|
||||
function addMissingVars($o) {
|
||||
if ( ! is_array($o) )
|
||||
if ( ! is_array($o) )
|
||||
return $o;
|
||||
$vars = [
|
||||
'Category',
|
||||
|
@ -845,10 +845,10 @@ function addMissingVars($o) {
|
|||
'SortName',
|
||||
'ca_fav',
|
||||
'Pinned'
|
||||
|
||||
|
||||
|
||||
|
||||
];
|
||||
|
||||
|
||||
foreach ($vars as $var) {
|
||||
$o[$var] = $o[$var] ?? null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue