improve the object NATv4 tab trigger
authorDenis Ovsienko <denis@ovsienko.info>
Fri, 16 Nov 2018 14:40:05 +0000 (14:40 +0000)
committerDenis Ovsienko <denis@ovsienko.info>
Fri, 16 Nov 2018 14:47:08 +0000 (14:47 +0000)
commitc309388fe32b7b4c50890337c7fd4727fbec6aa9
treebdaded8bfa05ff0ac85a146dcfa970479e941740
parent065c94cbed734a51d38b9b263f1f44d7e35262c8
improve the object NATv4 tab trigger

* getNATv4CountForObject(): a new helper function
* trigger_natv4(): update to work like trigger_ip(), i.e. keep the tab
  available so long as the object has associated items

Add some tests while at it.
tests/ObjectIPv4Test.php [new file with mode: 0644]
wwwroot/inc/database.php
wwwroot/inc/triggers.php