[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#839860: gosa-plugin-netgroups: fails to add a system to a netgroup



On Wed, Oct 05, 2016 at 09:07:17PM +0200, Wolfgang Schweer wrote:
> GOsa² throws an error about an undefined method 'plugin:plugin'; this is 
> most probably due to the PHP 7.0 transition (the constructor issue is 
> hidden by the methods issue).
 
These changes seem to fix it:

--- gosa-plugin-netgroups-0.1~svn652/admin/netgroups/class_netgroup.inc	2012-07-27 09:59:17.000000000 +0200
+++ plugins/admin/netgroups/class_netgroup.inc	2016-10-06 11:58:55.000000000 +0200
@@ -57,9 +57,9 @@
 
 	/* Constructor which load object attributes aso.
  	 * */
-    function netgroup(&$config, $dn= NULL) {
+    function __construct(&$config, $dn= NULL) {
 
-        plugin::plugin($config, $dn);
+        plugin::__construct($config, $dn);
 		$this->objectInfo = array("triple" => array(), "groups" => array());
         $this->orig_dn = $dn;
         $this->orig_cn = $this->cn;



--- gosa-plugin-netgroups-0.1~svn652/admin/systems/netgroups/class_netgroupSystem.inc	2016-10-06 13:13:03.000000000 +0200
+++ plugins/admin/systems/netgroups/class_netgroupSystem.inc	2016-10-06 12:03:50.000000000 +0200
@@ -48,12 +48,12 @@
 
 	/* Constructor: Prepare values, lists, ...
  	 * */
-	function netgroupSystem(&$config, $dn= NULL) 
+	function __construct(&$config, $dn= NULL) 
 	{
 		$this->config = $config;
 
 		/* Load bases attributes */
-		plugin::plugin($config, $dn);
+		plugin::__construct($config, $dn);
 
 		/* Setting cn to default */
 		if (isset($this->attrs['cn'][0])) {


Please check.

Wolfgang

Attachment: signature.asc
Description: Digital signature


Reply to: