Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
class-Address/ServiceGroup - move from error to warning if own Group …
Browse files Browse the repository at this point in the history
…is included as member
  • Loading branch information
Sven Waschkut committed Jun 11, 2018
1 parent ae04052 commit 9c83691
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ bugfix:
- fix service-edit actions=move - problem with API mode for TMP objects
- fix class AddressRuleContainer - fix is related address-merger for snathost replacement
- fix memory calculation for specific situations
- fix memory issue if own addressgroup/servicegroup is added as a subgroup in an offline configuration file
- fix memory issue if own addressgroup/servicegroup is added as a subgroup in an offline configuration file (move from error to warning)



Expand Down
5 changes: 4 additions & 1 deletion lib/object-classes/class-AddressGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,10 @@ public function & expand($keepGroupsInList=false)
if( $object->isGroup() )
{
if( $this->name() == $object->name() )
derr( "please cleanup your configuration file, addressgroup with name: ".$this->name()." is added as subgroup!!!" );
{
mwarning( "addressgroup with name: ".$this->name()." is added as subgroup to itself, you should review your XML config file" );
continue;
}

/** @var AddressGroup $object */
$tmpList = $object->expand();
Expand Down
6 changes: 5 additions & 1 deletion lib/object-classes/class-ServiceGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,11 @@ public function &expand($keepGroupsInList=false)
if( $object->isGroup() )
{
if( $this->name() == $object->name() )
derr( "please cleanup your configuration file, servicegroup with name: ".$this->name()." is added as subgroup!!!" );
{
mwarning( "servicegroup with name: ".$this->name()." is added as subgroup to itself, you should review your XML config file" );
continue;
}


$ret = array_merge( $ret, $object->expand() );
if( $keepGroupsInList )
Expand Down
2 changes: 1 addition & 1 deletion utils/common/actions-address.php
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@

);

//TODO: does not use the filtered objects 20180202

AddressCallContext::$supportedActions[] = Array(
'name' => 'replaceByMembersAndDelete',
'MainFunction' => function ( AddressCallContext $context )
Expand Down

0 comments on commit 9c83691

Please sign in to comment.