mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
font awesome upgrade to v6
This commit is contained in:
@@ -40,8 +40,17 @@ elseif ($FUNCTION == 'cleanLog')
|
||||
// Formatting data functions
|
||||
//------------------------------------------------------------------------------
|
||||
// Creates a PHP array from a string representing a python array (input format ['...','...'])
|
||||
// Only supports:
|
||||
// - one level arrays, not nested ones
|
||||
// - single quotes
|
||||
function createArray($input){
|
||||
|
||||
// empty array
|
||||
if($input == '[]')
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
// regex patterns
|
||||
$patternBrackets = '/(^\s*\[)|(\]\s*$)/';
|
||||
$patternQuotes = '/(^\s*\')|(\'\s*$)/';
|
||||
@@ -55,6 +64,12 @@ function createArray($input){
|
||||
// create array
|
||||
$optionsTmp = explode(",", $noBrackets);
|
||||
|
||||
// handle only one item in array
|
||||
if(count($optionsTmp) == 0)
|
||||
{
|
||||
return [preg_replace($patternQuotes, $replacement, $noBrackets)];
|
||||
}
|
||||
|
||||
// remove quotes
|
||||
foreach ($optionsTmp as $item)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user