Last modified: 2012-10-11 19:15:10 UTC
Hi, we've written an Overlay for your LdapAuthentication Extension to fit our needs. To achieve this, we wrote a class which is derived from LdapAuthenticationPlugin. To avoid Code Duplication it would be great to make all the private functions protected so they can be accessed from a child class. Especially the function getGroups. For your convenience i supplied a patch for this function. Regards No-L =================================================================== --- LdapAuthentication.php (Revision 110505) +++ LdapAuthentication.php (Arbeitskopie) @@ -1425,7 +1425,7 @@ * Function to get the user's groups. * @param string $username */ - private function getGroups( $username ) { + protected function getGroups( $username ) { $this->printDebug( "Entering getGroups", NONSENSITIVE );
Many methods in class LinksUpdate, CategoryViewer, and others are marked as private, when they should probably be protected. I don't see any reason why accessor methods need to be limited in their visibility. This breaks polymorphism and makes it hard (if not sometimes impossible) to write extensions. cd includes perl -pe 's/private/protected/g' -i LinksUpdate.php CategoryViewer.php
Noël, would you mind pushing a change into gerrit for this?
Gerrit change #26700