Skip to content

Commit

Permalink
Merge pull request #526 from swaschkut/main
Browse files Browse the repository at this point in the history
UTIL type=service-merger - class ServiceGroup | bugfix to not delete ServiceGroup members during merge
  • Loading branch information
swaschkut authored Mar 18, 2022
2 parents 23a07c0 + ffcbaa1 commit a9a1671
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
CHANGELOG

2.0.32
2.0.33
UTILS:

BUGFIX:

GENERAL:


2.0.32 (20220318)
UTILS:
* UTIL type=rule | rework 'filter=(service port.counter)' is now 'filter=(service.port.count >,<,=,! COUNT)')
* UTIL type=rule | extend actions=exportToExcel with service Counter
Expand All @@ -25,6 +33,7 @@ BUGFIX:
* UTIL type=device actions=display-shadowrule | bugfix for nat rules
* UTIL type=rule actions=exporttoExcel:FILE.html,ResolveScheduleSummary | bugfix to display all type of schedule
* class Rule.php methode zonecalculation - bugfix for NAT to
* UTIL type=service-merger - class ServiceGroup | bugfix to not delete ServiceGroup members during merge, if this member is available in same name and value at upperlevel

GENERAL:

Expand Down
2 changes: 1 addition & 1 deletion lib/misc-classes/PH.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function __construct($argv, $argc)

private static $library_version_major = 2;
private static $library_version_sub = 0;
private static $library_version_bugfix = 32;
private static $library_version_bugfix = 33;

//BASIC AUTH PAN-OS 7.1
public static $softwareupdate_key = "658d787f293e631196dac9fb29490f1cc1bb3827";
Expand Down
19 changes: 12 additions & 7 deletions lib/object-classes/ServiceGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,16 +316,21 @@ public function replaceReferencedObject($old, $new)

if( $pos !== FALSE )
{
while( $pos !== FALSE )
{
unset($this->members[$pos]);
$pos = array_search($old, $this->members, TRUE);
}

if( $new !== null && !$this->has( $new->name() ) )
{
$this->addMember($new, FALSE);
if( $old->name() == $new->name() )
$this->removeMember($old, FALSE);
else
$this->removeMember($old);
$this->members[] = $new;
$new->addReference($this);
}
else
$this->removeMember($old);
$old->removeReference($this);

if( $new === null || $new->name() != $old->name() )
$this->rewriteXML();

return TRUE;
}
Expand Down

0 comments on commit a9a1671

Please sign in to comment.