php8
This commit is contained in:
parent
16398d7893
commit
f481131a4e
Binary file not shown.
|
@ -20,6 +20,12 @@ $cfg['dockerSearch'] = "yes";
|
||||||
$cfg['unRaidVersion'] = $var['version'];
|
$cfg['unRaidVersion'] = $var['version'];
|
||||||
$caSettings = $cfg;
|
$caSettings = $cfg;
|
||||||
|
|
||||||
|
|
||||||
|
/* UNCOMMENT once the WebGUI is completely PHP8 compliant. Especially dockerMan
|
||||||
|
if ($caSettings['dev'] == "yes")
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
|
||||||
|
*/
|
||||||
require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
|
require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
|
||||||
require_once "$docroot/plugins/$plugin/include/paths.php";
|
require_once "$docroot/plugins/$plugin/include/paths.php";
|
||||||
require_once "$docroot/plugins/$plugin/include/helpers.php";
|
require_once "$docroot/plugins/$plugin/include/helpers.php";
|
||||||
|
@ -57,7 +63,7 @@ $nchanCom = version_compare($unRaidSettings['version'],"6.10.3",">");
|
||||||
// Check md5's of files
|
// Check md5's of files
|
||||||
exec("cd /usr/local/emhttp/plugins/$plugin/ && md5sum -c ca.md5",$output,$md5Error);
|
exec("cd /usr/local/emhttp/plugins/$plugin/ && md5sum -c ca.md5",$output,$md5Error);
|
||||||
|
|
||||||
$previousLocale = $_COOKIE["locale"];
|
$previousLocale = $_COOKIE["locale"] ?? "";
|
||||||
|
|
||||||
switch ($theme) {
|
switch ($theme) {
|
||||||
case 'black':
|
case 'black':
|
||||||
|
@ -93,7 +99,7 @@ if ( is_file($caPaths['addConverted']) ) {
|
||||||
$date = (date("n/d"));
|
$date = (date("n/d"));
|
||||||
|
|
||||||
$startupDisplayed = is_file($caPaths['startupDisplayed']) ? "true" : "false";
|
$startupDisplayed = is_file($caPaths['startupDisplayed']) ? "true" : "false";
|
||||||
if ( $startupDisplayed == "true" && $_COOKIE['ca_languageSwitch'] ) {
|
if ( $startupDisplayed == "true" && ($_COOKIE['ca_languageSwitch'] ?? false) ) {
|
||||||
$killCookie = "true";
|
$killCookie = "true";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2233,7 +2239,7 @@ function postNoSpin(options,callback) {
|
||||||
alert("<?tr("You have been logged out")?>");
|
alert("<?tr("You have been logged out")?>");
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
} else {
|
} else {
|
||||||
$("#templates_content").html(sprintf(tr("Something really wrong went on during %s"),options.action)+"<br><?tr("Post the ENTIRE contents of this message in the Community Applications Support Thread")?><br><br>OS: <?=$unRaidSettings['version']?> <?=$md5Error ? "<br>Modified CA" : ""?><br>Browser: <?=$_SERVER['HTTP_USER_AGENT']?><br>Language: <?=$_SESSION['locale']?><br><br>"+retval.escapeHTML());
|
$("#templates_content").html(sprintf(tr("Something really wrong went on during %s"),options.action)+"<br><?tr("Post the ENTIRE contents of this message in the Community Applications Support Thread")?><br><br>OS: <?=$unRaidSettings['version']?> <?=$md5Error ? "<br>Modified CA" : ""?><br>Browser: <?=$_SERVER['HTTP_USER_AGENT']?><br>Language: <?=($_SESSION['locale'] ?? null)?><br><br>"+retval.escapeHTML());
|
||||||
throw new Error("Something went badly wrong!"+options.action);
|
throw new Error("Something went badly wrong!"+options.action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2298,7 +2304,7 @@ function post(options,callback) {
|
||||||
alert("<?tr("You have been logged out")?>");
|
alert("<?tr("You have been logged out")?>");
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
} else {
|
} else {
|
||||||
$("#templates_content").html(sprintf(tr("Something really wrong went on during %s"),options.action)+"<br><?tr("Post the ENTIRE contents of this message in the Community Applications Support Thread")?><br><br>OS: <?=$unRaidSettings['version']?> <?=$md5Error ? "<br>Modified CA" : ""?><br>Browser: <?=$_SERVER['HTTP_USER_AGENT']?><br>Language: <?=$_SESSION['locale']?><br><br>"+retval.escapeHTML());
|
$("#templates_content").html(sprintf(tr("Something really wrong went on during %s"),options.action)+"<br><?tr("Post the ENTIRE contents of this message in the Community Applications Support Thread")?><br><br>OS: <?=$unRaidSettings['version']?> <?=$md5Error ? "<br>Modified CA" : ""?><br>Browser: <?=$_SERVER['HTTP_USER_AGENT']?><br>Language: <?=($_SESSION['locale'] ?? "")?><br><br>"+retval.escapeHTML());
|
||||||
throw new Error("Something went badly wrong!"+options.action);
|
throw new Error("Something went badly wrong!"+options.action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2429,7 +2435,7 @@ function feedWarning(currentServer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function tr(string) {
|
function tr(string) {
|
||||||
<?if ( ! ($_SESSION['locale'] == "" || $_SESSION['locale'] == "en_US") ) : ?>
|
<?if ( ! ( ($_SESSION['locale'] ?? "") == "" || ($_SESSION['locale'] ?? "") == "en_US") ) : ?>
|
||||||
return _(string);
|
return _(string);
|
||||||
<?else: ?>
|
<?else: ?>
|
||||||
return string;
|
return string;
|
||||||
|
@ -2475,7 +2481,7 @@ function updateLanguage(language) {
|
||||||
|
|
||||||
function postUpdateLanguage() {
|
function postUpdateLanguage() {
|
||||||
var languageUpdate = $.cookie("updateLanguage");
|
var languageUpdate = $.cookie("updateLanguage");
|
||||||
var currentLanguage = "<?=$_SESSION['locale']?>";
|
var currentLanguage = "<?=($_SESSION['locale'] ?? "")?>";
|
||||||
|
|
||||||
if (languageUpdate == currentLanguage)
|
if (languageUpdate == currentLanguage)
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
253bc8277a96c67716a1376e047570ef ./Apps.page
|
cfefda874e2de863f14da70bafdf70e4 ./Apps.page
|
||||||
4e55f7483b661af21a25b677179baffe ./CA_notices.page
|
4e55f7483b661af21a25b677179baffe ./CA_notices.page
|
||||||
600469ce287cb1ed78dc6cc11675cfaf ./ca_settings.page
|
600469ce287cb1ed78dc6cc11675cfaf ./ca_settings.page
|
||||||
e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg
|
e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg
|
||||||
9ffd40aedffad25c998e947faf169ad3 ./include/exec.php
|
c506f75e86d9f941f11eb4c949f00424 ./include/exec.php
|
||||||
3a1e5abf962bd5700e286a48c941b2c9 ./include/helpers.php
|
78d797120193602420951421f8c844ad ./include/helpers.php
|
||||||
8d15446d4edf60a1f4ac4493a494a301 ./include/paths.php
|
8d15446d4edf60a1f4ac4493a494a301 ./include/paths.php
|
||||||
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
|
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
|
||||||
71f911a818d88d3d567f8a2898094ee2 ./README.md
|
71f911a818d88d3d567f8a2898094ee2 ./README.md
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
# #
|
# #
|
||||||
###############################################################
|
###############################################################
|
||||||
|
|
||||||
ini_set('log_errors',TRUE);
|
|
||||||
ini_set('error_log',"/tmp/php");
|
|
||||||
ini_set('memory_limit','256M'); // REQUIRED LINE
|
ini_set('memory_limit','256M'); // REQUIRED LINE
|
||||||
$unRaidSettings = parse_ini_file("/etc/unraid-version");
|
$unRaidSettings = parse_ini_file("/etc/unraid-version");
|
||||||
### Translations section has to be first so that nothing else winds up caching the file(s)
|
### Translations section has to be first so that nothing else winds up caching the file(s)
|
||||||
|
@ -31,6 +29,9 @@ require_once "$docroot/webGui/include/Markdown.php";
|
||||||
|
|
||||||
$caSettings = parse_plugin_cfg("community.applications");
|
$caSettings = parse_plugin_cfg("community.applications");
|
||||||
|
|
||||||
|
if ($caSettings['dev'] == "yes")
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
|
||||||
$caSettings['dockerSearch'] = "yes";
|
$caSettings['dockerSearch'] = "yes";
|
||||||
$caSettings['unRaidVersion'] = $unRaidSettings['version'];
|
$caSettings['unRaidVersion'] = $unRaidSettings['version'];
|
||||||
$caSettings['favourite'] = isset($caSettings['favourite']) ? str_replace("*","'",$caSettings['favourite']) : "";
|
$caSettings['favourite'] = isset($caSettings['favourite']) ? str_replace("*","'",$caSettings['favourite']) : "";
|
||||||
|
@ -969,10 +970,10 @@ function force_update() {
|
||||||
global $caPaths;
|
global $caPaths;
|
||||||
|
|
||||||
$lastUpdatedOld = readJsonFile($caPaths['lastUpdated-old']);
|
$lastUpdatedOld = readJsonFile($caPaths['lastUpdated-old']);
|
||||||
debug("old feed timestamp: {$lastUpdatedOld['last_updated_timestamp']}");
|
debug("old feed timestamp: ".($lastUpdatedOld['last_updated_timestamp'] ?? ""));
|
||||||
@unlink($caPaths['lastUpdated']);
|
@unlink($caPaths['lastUpdated']);
|
||||||
$latestUpdate = download_json($caPaths['application-feed-last-updated'],$caPaths['lastUpdated'],"",5);
|
$latestUpdate = download_json($caPaths['application-feed-last-updated'],$caPaths['lastUpdated'],"",5);
|
||||||
if ( ! $latestUpdate['last_updated_timestamp'] )
|
if ( ! $latestUpdate['last_updated_timestamp'] ?? false )
|
||||||
$latestUpdate = download_json($caPaths['application-feed-last-updatedBackup'],$caPaths['lastUpdated'],"",5);
|
$latestUpdate = download_json($caPaths['application-feed-last-updatedBackup'],$caPaths['lastUpdated'],"",5);
|
||||||
debug("new appfeed timestamp: {$latestUpdate['last_updated_timestamp']}");
|
debug("new appfeed timestamp: {$latestUpdate['last_updated_timestamp']}");
|
||||||
if ( ! isset($latestUpdate['last_updated_timestamp']) ) {
|
if ( ! isset($latestUpdate['last_updated_timestamp']) ) {
|
||||||
|
|
|
@ -439,7 +439,6 @@ function pluginDupe() {
|
||||||
function checkInstalledPlugin($template) {
|
function checkInstalledPlugin($template) {
|
||||||
global $caPaths;
|
global $caPaths;
|
||||||
|
|
||||||
debug("checkInstalledPlugin $template");
|
|
||||||
$pluginName = basename($template['PluginURL']);
|
$pluginName = basename($template['PluginURL']);
|
||||||
if ( ! file_exists("/var/log/plugins/$pluginName") ) return false;
|
if ( ! file_exists("/var/log/plugins/$pluginName") ) return false;
|
||||||
$dupeList = readJsonFile($caPaths['pluginDupes']);
|
$dupeList = readJsonFile($caPaths['pluginDupes']);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user