Fixed: infinite loop possible in extremely unlikely chain of events
This commit is contained in:
parent
9bc83094b1
commit
17308918e6
Binary file not shown.
|
@ -3,7 +3,7 @@ ae9874967a4715939f3e97c53676cc33 ./Apps.page
|
||||||
4c5d4598e1bafa46bd90c27cbe302122 ./ca_settings.page
|
4c5d4598e1bafa46bd90c27cbe302122 ./ca_settings.page
|
||||||
e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg
|
e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg
|
||||||
5865b879fdb3dbfb6c893cb49418c6bd ./include/exec.php
|
5865b879fdb3dbfb6c893cb49418c6bd ./include/exec.php
|
||||||
58943e7d6c7ded15b71f160bd4493f1d ./include/helpers.php
|
779ead1d9a8859dd9eed735e673dd8f4 ./include/helpers.php
|
||||||
116042a918060278e77379b0dd73482c ./include/paths.php
|
116042a918060278e77379b0dd73482c ./include/paths.php
|
||||||
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
|
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
|
||||||
71f911a818d88d3d567f8a2898094ee2 ./README.md
|
71f911a818d88d3d567f8a2898094ee2 ./README.md
|
||||||
|
|
|
@ -63,7 +63,6 @@ function writeJsonFile($filename,$jsonArray) {
|
||||||
|
|
||||||
if ( ! $result )
|
if ( ! $result )
|
||||||
debug("Write error $filename");
|
debug("Write error $filename");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function download_url($url, $path = "", $bg = false, $timeout = 45) {
|
function download_url($url, $path = "", $bg = false, $timeout = 45) {
|
||||||
|
@ -374,7 +373,7 @@ function moderateTemplates() {
|
||||||
}
|
}
|
||||||
writeJsonFile($caPaths['community-templates-info'],$o);
|
writeJsonFile($caPaths['community-templates-info'],$o);
|
||||||
$GLOBALS['templates'] = $o;
|
$GLOBALS['templates'] = $o;
|
||||||
pluginDupe($o);
|
pluginDupe();
|
||||||
}
|
}
|
||||||
#######################################################
|
#######################################################
|
||||||
# Function to check for a valid URL #
|
# Function to check for a valid URL #
|
||||||
|
@ -401,12 +400,12 @@ function filterMatch($filter,$searchArray,$exact=true) {
|
||||||
##########################################################
|
##########################################################
|
||||||
# Used to figure out which plugins have duplicated names #
|
# Used to figure out which plugins have duplicated names #
|
||||||
##########################################################
|
##########################################################
|
||||||
function pluginDupe($templates) {
|
function pluginDupe() {
|
||||||
global $caPaths;
|
global $caPaths;
|
||||||
|
|
||||||
$pluginList = [];
|
$pluginList = [];
|
||||||
$dupeList = [];
|
$dupeList = [];
|
||||||
foreach ($templates as $template) {
|
foreach ($GLOBALS['templates'] as $template) {
|
||||||
if ( $template['Plugin'] )
|
if ( $template['Plugin'] )
|
||||||
$pluginList[basename($template['Repository'])]++;
|
$pluginList[basename($template['Repository'])]++;
|
||||||
}
|
}
|
||||||
|
@ -538,8 +537,7 @@ function formatTags($leadTemplate,$rename="false") {
|
||||||
|
|
||||||
$type = $rename == "true" ? "second" : "default";
|
$type = $rename == "true" ? "second" : "default";
|
||||||
|
|
||||||
// $file = readJsonFile($caPaths['community-templates-info']);
|
$file = &$GLOBALS['templat`12es'];
|
||||||
$file = &$GLOBALS['templates'];
|
|
||||||
|
|
||||||
$template = $file[$leadTemplate];
|
$template = $file[$leadTemplate];
|
||||||
$childTemplates = $file[$leadTemplate]['BranchID'];
|
$childTemplates = $file[$leadTemplate]['BranchID'];
|
||||||
|
@ -573,19 +571,17 @@ function postReturn($retArray) {
|
||||||
####################################
|
####################################
|
||||||
# Translation backwards compatible #
|
# Translation backwards compatible #
|
||||||
####################################
|
####################################
|
||||||
if ( ! function_exists("tr") ) {
|
function tr($string,$options=-1) {
|
||||||
function tr($string,$options=-1) {
|
$translated = _($string,$options);
|
||||||
$translated = _($string,$options);
|
if ( ! trim($translated) )
|
||||||
if ( ! trim($translated) )
|
$translated = $string;
|
||||||
$translated = $string;
|
|
||||||
|
if ( startsWith($translated,""") && endsWith($translated,""") )
|
||||||
if ( startsWith($translated,""") && endsWith($translated,""") )
|
$translated = first_str_replace(last_str_replace($translated,""",""),""","");
|
||||||
$translated = first_str_replace(last_str_replace($translated,""",""),""","");
|
|
||||||
|
|
||||||
$translated = str_replace('"',""",str_replace("'","'",$translated));
|
$translated = str_replace('"',""",str_replace("'","'",$translated));
|
||||||
|
|
||||||
return $translated;
|
return $translated;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#############################
|
#############################
|
||||||
# Check for language update #
|
# Check for language update #
|
||||||
|
|
Loading…
Reference in New Issue
Block a user