Hi Mike. On Fri, Jan 20, 2017 at 01:19:11PM +0000, Mike Gabriel wrote: > The most likely thing to happen when naming the function __netgrouptabs() is > that it is not executed at all, but instead parent::__construct() gets > executed. > > ``` > function netgrouptabs($config, $data, $dn, $cat = "", $hide_refs = > FALSE, $hide_acls = FALSE) { > tabs::__plugin($config, $data, $dn, "netgroups", $hide_refs, > $hide_acls); > $this->addSpecialTabs(); > } > ``` > > So what happens is that $this->addSpecialTabs(); will not get called when > instantiating the tabs. This results in missing tabs: ACL, References. I > guess, those are missing in your setup now, right?
Yes, you're right. The missing tabs slipped my attention. > In object oriented programming, giving method names same names is common > practice, so the method netgrouptabs::__construct() will overload the method > parent::__construct() (i.e. tabs::__construct() here). The new > method has to mimmick the parent's method's functionality (by simply calling > it in most cases) and add some extra magic possibly. Thanks for the explanation. > I will now upload a fix for this (using __construct() ) with delay of 2 days > so you can veto and cross check once more. Thanks! As far as I can tell it should rather be: diff --git a/debian/patches/1003_php7-compliance.patch b/debian/patches/1003_php7-compliance.patch index b17b39b..76a29e8 100644 --- a/debian/patches/1003_php7-compliance.patch +++ b/debian/patches/1003_php7-compliance.patch @@ -58,7 +58,7 @@ Author: Wolfgang Schweer <wschw...@arcor.de> - function netgrouptabs($config, $data, $dn, $cat = "", $hide_refs = FALSE, $hide_acls = FALSE) { - tabs::tabs($config, $data, $dn, "netgroups", $hide_refs, $hide_acls); + function __construct($config, $data, $dn, $cat = "", $hide_refs = FALSE, $hide_acls = FALSE) { -+ tabs::__plugin($config, $data, $dn, "netgroups", $hide_refs, $hide_acls); ++ tabs::__construct($config, $data, $dn, "netgroups", $hide_refs, $hide_acls); $this->addSpecialTabs(); } IMO the real reason why __construct was failing as replacement for netgrouptabs was tabs::__plugin which should have been tabs::__construct. Wolfgang
signature.asc
Description: PGP signature