Always display $RepoName on plugin's sidebar

pull/11/head
Squidly271 2022-12-04 07:31:08 -05:00
parent 3e77007859
commit 0834997104
5 changed files with 16 additions and 30 deletions

View File

@ -22,6 +22,7 @@ $caSettings = $cfg;
require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
require_once "$docroot/plugins/$plugin/include/paths.php";
require_once "$docroot/plugins/$plugin/include/helpers.php";
require_once "$docroot/plugins/dynamix.plugin.manager/include/PluginHelpers.php";
$DockerClient = new DockerClient();
@ -35,8 +36,6 @@ exec("rm $docroot/CA-Logging*.zip");
$diagnosticsFile = htmlspecialchars(str_replace(' ','_',strtolower($var['NAME'])));
if ( $cfg['maxPerPage'] < 24 ) $cfg['maxPerPage'] = 24;
if ( ! is_file($caPaths['warningAccepted']) ) {
@ -114,7 +113,7 @@ if ( is_file("/var/run/dockerd.pid") && is_dir("/proc/".@file_get_contents("/var
}
if ( is_file($caPaths['docker_cfg']) )
getAllInfo(true);
getAllInfo(true,false);
function tr($string,$ret=false) {

View File

@ -1,9 +1,9 @@
65e7880ea50bfb83b9f93d857e7163ea ./Apps.page
bbfb490b1b8b411551c175e6de15bceb ./Apps.page
4e55f7483b661af21a25b677179baffe ./CA_notices.page
4c5d4598e1bafa46bd90c27cbe302122 ./ca_settings.page
e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg
4b44cdcda03fe86956e0089da72ca41c ./include/exec.php
c024b16874373b3d45f3e082a1dfb49b ./include/helpers.php
29f110f50c87f9e8285aca289bce6e57 ./include/exec.php
e63cfb7150febb21ac4e04b783d36c24 ./include/helpers.php
116042a918060278e77379b0dd73482c ./include/paths.php
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
71f911a818d88d3d567f8a2898094ee2 ./README.md
@ -22,4 +22,4 @@ da3b4f9b73c5c3bf65be6c42d68b51f9 ./scripts/showStatistics.php
34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php
25bdaed6f62ac73f9ef7c3ce0c125ef7 ./skins/Narrow/css.php
7eb021a105e2f7a15675ec8a14e6f05e ./skins/Narrow/skin.html
941350e2736b01f31f5c64a30f124e36 ./skins/Narrow/skin.php
22b3cfb0444f874bb778a8418fc2f1a3 ./skins/Narrow/skin.php

View File

@ -9,7 +9,7 @@
error_reporting(E_ALL);
ini_set('log_errors',TRUE);
ini_set('error_log',"/tmp/php");
ini_set('memory_limit','256M');
ini_set('memory_limit','256M'); // REQUIRED LINE
$unRaidSettings = parse_ini_file("/etc/unraid-version");
### Translations section has to be first so that nothing else winds up caching the file(s)
@ -59,16 +59,6 @@ if ( !is_dir($caPaths['templates-community']) ) {
@unlink($caPaths['community-templates-info']);
}
if ( ! is_file($caPaths['logging']) ) {
$caVersion = plugin("version","/var/log/plugins/community.applications.plg");
debug("Community Applications Version: $caVersion");
debug("Unraid version: {$caSettings['unRaidVersion']}");
debug("MD5's: \n".shell_exec("cd /usr/local/emhttp/plugins/community.applications && md5sum -c ca.md5"));
$lingo = $_SESSION['locale'] ?: "en_US";
debug("Language: $lingo");
debug("Settings:\n".print_r($caSettings,true));
}
debug("POST CALLED ({$_POST['action']})\n".print_r($_POST,true));
@ -244,7 +234,6 @@ function DownloadApplicationFeed() {
$i = 0;
$lastUpdated['last_updated_timestamp'] = $ApplicationFeed['last_updated_timestamp'];
writeJsonFile($caPaths['lastUpdated-old'],$lastUpdated);
/* $myTemplates = []; */
foreach ($ApplicationFeed['applist'] as $o) {
if ( (! isset($o['Repository']) ) && (! isset($o['Plugin']) ) && (!isset($o['Language']) )){
@ -337,8 +326,6 @@ function DownloadApplicationFeed() {
$o['Category'] = str_replace("Status:Stable","",$o['Category']);
$myTemplates[$i] = $o;
if ( ! $o['DonateText'] && ($ApplicationFeed['repositories'][$o['RepoName']]['DonateText'] ?? false) )
$o['DonateText'] = $ApplicationFeed['repositories'][$o['RepoName']]['DonateText'];
if ( ! $o['DonateLink'] && ($ApplicationFeed['repositories'][$o['RepoName']]['DonateLink'] ?? false) )
@ -639,10 +626,10 @@ function displayRepositories() {
$repositories = readJsonFile($caPaths['repositoryList']);
if ( is_file($caPaths['community-templates-allSearchResults']) ) {
$temp = readJsonFile($caPaths['community-templates-allSearchResults']);
$templates = $temp['community'];
$templates = &$temp['community'];
} else {
$temp = readJsonFile($caPaths['community-templates-displayed']);
$templates = $temp['community'];
$templates = &$temp['community'];
}
if ( is_file($caPaths['startupDisplayed']) ) {
$templates = &$GLOBALS['templates'];
@ -987,7 +974,6 @@ function force_update() {
if ( ! $latestUpdate['last_updated_timestamp'] )
$latestUpdate = download_json($caPaths['application-feed-last-updatedBackup'],$caPaths['lastUpdated'],"",5);
$badDownload = false;
if ( ! isset($latestUpdate['last_updated_timestamp']) ) {
$latestUpdate['last_updated_timestamp'] = INF;
$badDownload = true;
@ -998,9 +984,11 @@ function force_update() {
if ( $latestUpdate['last_updated_timestamp'] != INF )
copy($caPaths['lastUpdated'],$caPaths['lastUpdated-old']);
if ( ! $badDownload ) {
@unlink($caPaths['community-templates-info']);
$GLOBALS['templates'] = [];
if (isset($badDownload)) {
if ( ! $badDownload ) {
@unlink($caPaths['community-templates-info']);
$GLOBALS['templates'] = [];
}
}
}
@ -1695,7 +1683,6 @@ function removePrivateApp() {
postReturn(["error"=>"Path not contained within /boot/config/community.applications"]);
return;
}
// $templates = readJsonFile($caPaths['community-templates-info']);
$templates = &$$GLOBALS['templates'];
$displayed = readJsonFile($caPaths['community-templates-displayed']);
@ -2356,7 +2343,7 @@ function enableActionCentre() {
# wait til templates are downloaded
for ( ;; ) {
$file = &$GLOBALS['templates'];
if ( ! $file ) {
if ( ! $file || empty($file) ) {
debug("Action Centre sleeping - no templates yet");
sleep(5);
} else {

View File

@ -1547,7 +1547,7 @@ function displayPopup($template) {
</div>
<div class='popupInfoRight'>
<div class='popupAuthorTitle'>".($Plugin ? tr("Author") : tr("Maintainer"))."</div>
<div><div class='popupAuthor'>".($Plugin ? $Author : $RepoName)."</div>
<div><div class='popupAuthor'>".($RepoName)."</div>
<div class='popupAuthorIcon'><img class='popupAuthorIcon' src='$ProfileIcon' onerror='this.src=&quot;/plugins/dynamix.docker.manager/images/question.png&quot;' alt='Repository Icon'></img></div>
</div>
<div class='ca_repoSearchPopUp popupProfile' data-repository='".htmlentities($Repo,ENT_QUOTES)."'>".tr("All Apps")."</div>