Add space in array formatting

This commit is contained in:
Emmanuel Papin 2015-05-15 08:11:51 +02:00
parent 775da60382
commit 0241f844d2
1 changed files with 49 additions and 49 deletions

View File

@ -42,52 +42,52 @@ $plugin_path = dirname($_SERVER['SCRIPT_FILENAME'])."/plugins/".$plugin;
$focusWindow = true; $focusWindow = true;
$generalOptions=array( $generalOptions = array(
'Enabled'=>array( 'Enabled' => array(
'Type'=>'select', 'Type' => 'select',
'Choices'=>'Yes,No', 'Choices' => 'Yes,No',
'Value'=>'No' 'Value' => 'No',
), ),
'RequireNatDet'=>array( 'RequireNatDet' => array(
'Type'=>'select', 'Type' => 'select',
'Choices'=>'Yes,No', 'Choices' => 'Yes,No',
'Value'=>'No', 'Value' => 'No',
'Require'=>array( 'Require' => array(
array( array(
'Name'=>'Enabled', 'Name' => 'Enabled',
'Value'=>'Yes' 'Value' => 'Yes',
) ),
) ),
), ),
'IncludeNatDet'=>array( 'IncludeNatDet' => array(
'Type'=>'select', 'Type' => 'select',
'Choices'=>'Yes,No', 'Choices' => 'Yes,No',
'Value'=>'No', 'Value' => 'No',
'Require'=>array( 'Require' => array(
array( array(
'Name'=>'Enabled', 'Name' => 'Enabled',
'Value'=>'Yes' 'Value' => 'Yes',
), ),
array( array(
'Name'=>'RequireNatDet', 'Name' => 'RequireNatDet',
'Value'=>'Yes' 'Value' => 'Yes',
) ),
) ),
), ),
'ReInitNatDet'=>array( 'ReInitNatDet' => array(
'Type'=>'select', 'Type' => 'select',
'Choices'=>'Yes,No', 'Choices' => 'Yes,No',
'Value'=>'No', 'Value' => 'No',
'Require'=>array( 'Require' => array(
array( array(
'Name'=>'Enabled', 'Name' => 'Enabled',
'Value'=>'Yes' 'Value' => 'Yes',
), ),
array( array(
'Name'=>'RequireNatDet', 'Name' => 'RequireNatDet',
'Value'=>'Yes' 'Value' => 'Yes',
) ),
) ),
), ),
'AlarmScore'=>array( 'AlarmScore'=>array(
'Type'=>'integer', 'Type'=>'integer',
@ -96,11 +96,11 @@ $generalOptions=array(
'Value'=>'99', 'Value'=>'99',
'Require'=>array( 'Require'=>array(
array( array(
'Name'=>'Enabled', 'Name' => 'Enabled',
'Value'=>'Yes' 'Value' => 'Yes',
) ),
) ),
) ),
); );
$pOptions=$generalOptions; $pOptions=$generalOptions;
@ -116,16 +116,16 @@ if(file_exists($plugin_path."/config.php"))
{ {
$optionValue['Require'] = array ( $optionValue['Require'] = array (
array( array(
'Name'=>'Enabled', 'Name' => 'Enabled',
'Value'=>'Yes' 'Value' => 'Yes',
) ),
); );
} }
elseif(is_array($optionValue['Require'])) elseif(is_array($optionValue['Require']))
{ {
$optionValue['Require'][] = array ( $optionValue['Require'][] = array (
'Name'=>'Enabled', 'Name' => 'Enabled',
'Value'=>'Yes' 'Value' => 'Yes',
); );
} }
else else
@ -161,9 +161,9 @@ foreach( dbFetchAll( $sql, NULL, array( $mid, $zid, $plugin ) ) as $popt )
else if($popt['Name'] != 'Enabled') else if($popt['Name'] != 'Enabled')
$pOptions[$popt['Name']]['Require'] = array ( $pOptions[$popt['Name']]['Require'] = array (
array( array(
'Name'=>'Enabled', 'Name' => 'Enabled',
'Value'=>'Yes' 'Value' => 'Yes',
) ),
); );
} else { } else {
dbQuery('DELETE FROM PluginsConfig WHERE Id=?', array( $popt['Id'] ) ); dbQuery('DELETE FROM PluginsConfig WHERE Id=?', array( $popt['Id'] ) );