Added - adjust templates if share already exists in a different case
Fixed - After returning from an install, the main area could be scrolled separately from the sidebar
This commit is contained in:
Squidly271 2021-12-01 08:37:23 -05:00
parent daec060279
commit 9088857c74
6 changed files with 57 additions and 26 deletions

Binary file not shown.

View File

@ -358,7 +358,6 @@ $(function(){
$(".dropdown-menu").hide();
return;
}
$("body").addClass("body_sidebarScroll");
var apppath = $(this).data("apppath");
var appname = $(this).data("appname");
@ -2092,6 +2091,8 @@ function showSidebarApp(apppath,appname) {
$.cookie("sidebarAppName",appname);
data.sidebarapppath = apppath;
data.sidebarappname = appname;
$("body").addClass("body_sidebarScroll");
$("#sidenavContent").html("");
$(".sidebar").fadeIn();
$(".back_to_top").addClass("back_to_top_hide");

View File

@ -1,9 +1,9 @@
cfab760a899abbd8d622abb32f82e13c ./Apps.page
e38e55c665414fdbaf56ec4f5182dad9 ./Apps.page
83b3f89cd42e8601c7c217d5b4889c81 ./CA_notices.page
7ee0b23dbd92ed55f611360a983f9565 ./ca_settings.page
1b49ec9797713ce869ea0c1066a109f2 ./default.cfg
cf9306e6dc141752c26637363831bbb0 ./include/exec.php
2c3ed2682b378b0a06bf445f2d9ca403 ./include/helpers.php
153741a73e58d9ea5a001880626e3f81 ./include/exec.php
2d09e346fa8f73adbb4b1870dbb6b8ca ./include/helpers.php
95709ae0ed53e2889a93849a69b37892 ./include/paths.php
410c0166bae560754e231486050621f6 ./javascript/libraries.js
8c24d585c7dd3ff9ef961bb2c2705711 ./PluginAPI.page
@ -22,4 +22,4 @@ e3dc9ed23036a09d69d5cd5c3111751e ./scripts/showStatistics.php
2bd671daecaf01549f8cc0202cb184b3 ./scripts/updatePluginSupport.php
a8900ea90ba3a4937a4648ae92f9e848 ./skins/Narrow/css.php
cfa1511913f794c8c5980460dfcdf049 ./skins/Narrow/skin.html
739bf48e904a23e1e872b94589ccf9fa ./skins/Narrow/skin.php
1b8ee27878d267006182231218d02f91 ./skins/Narrow/skin.php

View File

@ -1744,6 +1744,52 @@ function createXML() {
$valueReferenced = array_values(array_filter(explode("/",$config['value'])));
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
if ( ! $config['value'] ) { // Don't override default if value exists
$configPath = explode("/",$config['@attributes']['Default']);
$testPath = "/";
foreach ($configPath as &$entry) {
$directories = @scandir($testPath);
if ( ! $directories ) {
break;
}
foreach ($directories as $testDir) {
if ( strtolower($testDir) == strtolower($entry) ) {
if ( $testDir == $entry )
break;
$entry = $testDir;
}
}
$testPath .= $entry."/";
}
$config['@attributes']['Default'] = implode("/",$configPath);
}
// entered path
if ( $config['value'] ) {
$configPath = explode("/",$config['value']);
$testPath = "/";
foreach ($configPath as &$entry) {
$directories = @scandir($testPath);
if ( ! $directories ) {
break;
}
foreach ($directories as $testDir) {
if ( strtolower($testDir) == strtolower($entry) ) {
if ( $testDir == $entry )
break;
$entry = $testDir;
}
}
$testPath .= $entry."/";
}
$config['value'] = implode("/",$configPath);
}
}
}
}

View File

@ -171,14 +171,7 @@ function favouriteSort($a,$b) {
# returns the index number of the array #
# return value === false if not found #
###############################################
function searchArray($array,$key,$value,$multi=false) {
if ( $multi )
return array_keys(array_column($array,$key),$value);
else
return array_search($value,array_column($array,$key));
/* $result = false;
function searchArray($array,$key,$value,$startingIndex=0) {
if (count($array) ) {
for ($i = $startingIndex; $i <= max(array_keys($array)); $i++) {
if ( $array[$i][$key] == $value ) {
@ -187,7 +180,7 @@ function searchArray($array,$key,$value,$multi=false) {
}
}
}
return $result; */
return $result;
}
########################################################
# Fix common problems (maintainer errors) in templates #

View File

@ -371,17 +371,7 @@ function getPopupDescriptionSkin($appNumber) {
$index = searchArray($displayed['community'],"InstallPath",$appNumber);
if ( $index === false ) {
$ind = searchArray($displayed['community'],"Path",$appNumber,true);
foreach ($ind as $i) {
$template = $displayed[$i];
if ( $template['Name'] == $displayed['community'][$i]['Name'] ) {
$index = $i;
break;
}
}
}
/* $ind = $index;
$ind = $index;
while ( true ) {
$template = $displayed[$ind];
if ( $template['Name'] == $displayed['community'][$ind]['Name'] ) {
@ -394,7 +384,7 @@ function getPopupDescriptionSkin($appNumber) {
break;
}
}
}*/
}
if ( $index !== false ) {
$template = $displayed['community'][$index];
@ -1057,6 +1047,7 @@ function displayCard($template) {
";
if ( $class=='spotlightHome' ) {
$Overview = $Overview ?: $Description;
$ovr = html_entity_decode($Overview);
$ovr = trim($ovr);
$ovr = str_replace(["[","]"],["<",">"],$ovr);