Commit fa8a1975 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixed plugins and services contructor according to last core changes

Conflicts:
	dhcp/admin/dhcp/class_dhcpConfiguration.inc
	dhcp/admin/systems/services/dhcp/class_serviceDHCP.inc
	systems/admin/systems/class_componentGeneric.inc
	systems/admin/systems/class_mobilePhoneGeneric.inc
	systems/admin/systems/class_printGeneric.inc
	systems/admin/systems/class_terminalGeneric.inc
	systems/admin/systems/class_terminalStartup.inc
parent e83da6a0
......@@ -22,12 +22,12 @@
class serviceApache extends simpleService
{
var $objectclasses = array("whatever");
var $objectclasses = array('whatever');
function __construct ($unused, $dn = NULL, $parent = NULL)
function __construct ($dn = NULL, $parent = NULL)
{
global $config;
parent::__construct ($unused, $dn, $parent, array());
parent::__construct ($dn, $parent, array());
if (($dn != 'new') && ($dn != NULL)) {
......
......@@ -23,8 +23,6 @@ class application extends simplePlugin
{
var $objectclasses = array('fdDesktopApplication');
var $mainTab = TRUE;
static function plInfo()
{
return array(
......@@ -113,9 +111,9 @@ class application extends simplePlugin
);
}
function __construct ($unused, $dn = NULL, $object = NULL)
function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE)
{
parent::__construct($unused, $dn, $object);
parent::__construct($dn, $object, $parent, $mainTab);
$this->attributesAccess['cn']->setUnique(TRUE);
......
......@@ -20,8 +20,6 @@
class webApplication extends simplePlugin
{
var $mainTab = TRUE;
var $objectclasses = array('fdWebApplication');
public static function plInfo()
......@@ -81,10 +79,5 @@ class webApplication extends simplePlugin
),
);
}
function __construct ($unused, $dn = NULL, $object = NULL)
{
parent::__construct($unused, $dn, $object);
}
}
?>
......@@ -55,9 +55,9 @@ class applicationRights extends simplePlugin
);
}
function __construct ($unused, $dn = NULL, $object = NULL)
function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE)
{
parent::__construct($unused, $dn, $object);
parent::__construct($dn, $object, $parent, $mainTab);
$apps = objects::ls('application');
$apps = array_merge($apps, objects::ls('webApplication'));
......
......@@ -76,14 +76,13 @@ class argonautImportFile extends simplePlugin
);
}
public function __construct($config, &$parent)
public function __construct($parent)
{
parent::__construct($config, $config->current['BASE']);
parent::__construct($config->current['BASE'], NULL, $parent);
$this->attributesAccess['import']->setInLdap(FALSE);
$this->attributesAccess['import']->setLinearRendering(TRUE);
$this->parent = $parent;
$this->events = array();
$this->daemon_events = argonautAction::get_event_types();
}
......
......@@ -80,7 +80,7 @@ class argonautQueue extends simpleManagement
function importEvents()
{
$this->dialogObject = new argonautImportFile(NULL, $this);
$this->dialogObject = new argonautImportFile($this);
}
/*! \brief Queue selected objects to be removed.
......
......@@ -106,10 +106,22 @@ class ArgonautServiceNameAttribute extends CompositeAttribute
class argonautClient extends simplePlugin
{
var $objectclasses = array("argonautClient");
var $objectclasses = array('argonautClient');
var $displayHeader = TRUE;
var $inheritance = array("gosaGroupOfNames" => "member");
var $inheritance = array('gosaGroupOfNames' => 'member');
static function plInfo ()
{
return array(
'plShortName' => _('Argonaut client'),
'plDescription' => _('Edit argonaut client settings'),
'plSelfModify' => FALSE,
'plObjectType' => array('workstation','server','ogroup-dynamic'),
'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo())
);
}
// The main function : information about attributes
static function getAttributesInfo ()
......@@ -178,9 +190,9 @@ class argonautClient extends simplePlugin
);
}
function __construct($unused, $dn = NULL, $object = NULL)
function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE)
{
parent::__construct($unused, $dn, $object);
parent::__construct($dn, $object, $parent, $mainTab);
$this->attributesAccess['argonautClientProtocol']->setManagedAttributes(
array(
'disable' => array (
......@@ -192,20 +204,6 @@ class argonautClient extends simplePlugin
)
);
}
// We also need this function that return some information about the plugin
static function plInfo ()
{
return array(
'plShortName' => _('Argonaut client'),
'plDescription' => _('Edit argonaut client settings'),
'plSelfModify' => FALSE,
'plObjectType' => array('workstation','server','ogroup-dynamic'),
// But simplePlugin can generate the ACL list for us
'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo())
);
}
}
?>
......@@ -20,7 +20,7 @@
class argonautDNSConfig extends simpleService
{
var $objectclasses = array("argonautDNSConfig");
var $objectclasses = array('argonautDNSConfig');
var $showActions = FALSE;
/* Return plugin informations for acl handling */
......@@ -95,7 +95,7 @@ class argonautDNSConfig extends simpleService
_('path to rndc binary'),
'argonautLdap2zoneRndc',
FALSE,
"/usr/sbin/rndc"
'/usr/sbin/rndc'
)
)
)
......
......@@ -75,10 +75,10 @@ class argonautFuseConfig extends simpleService
);
}
function __construct($unused, $dn, $object = NULL, $attributesInfo = NULL)
function __construct ($dn = NULL, $parent = NULL)
{
global $config;
parent::__construct($unused, $dn, $object, $attributesInfo);
parent::__construct($dn, $parent);
/* Load modules */
$this->plugin = array();
......@@ -89,7 +89,7 @@ class argonautFuseConfig extends simpleService
continue;
}
$name = $plug['CLASS'];
$this->plugin[$name] = new $name($config, $dn, $object);
$this->plugin[$name] = new $name($dn, $object, $parent);
$this->plugin[$name]->set_acl_category($this->acl_category);
$this->plugin[$name]->set_acl_base($this->dn);
......@@ -114,11 +114,6 @@ class argonautFuseConfig extends simpleService
$display = simplePlugin::execute();
foreach ($this->plugin as &$plugin) {
if ($this->parent !== NULL) {
$plugin->parent = $this->parent;
} else {
$plugin->parent = $this;
}
$display .= '<p class="seperator plugbottom">&nbsp;</p><div></div>';
$display .= $plugin->execute();
}
......
......@@ -64,9 +64,4 @@ class argonautFuseFAIConfig extends simplePlugin
)
);
}
function __construct($unused, $dn, $object = NULL, $attributesInfo = NULL)
{
parent::__construct($unused, $dn, $object, $attributesInfo);
}
}
......@@ -21,19 +21,19 @@
class argonautFuseLTSPConfig extends simplePlugin
{
var $objectclasses = array("argonautFuseLTSPConfig");
var $objectclasses = array('argonautFuseLTSPConfig');
var $showActions = FALSE;
var $displayHeader = TRUE;
var $displayHeader = TRUE;
/* Return plugin informations for acl handling */
static function plInfo()
{
return array(
"plShortName" => _("Argonaut Fuse LTSP module settings"),
"plDescription" => _("Argonaut Fuse LTSP module settings")." ("._("Services").")",
"plCategory" => array("server"),
"plObjectType" => array("fusemodule"),
"plProvidedAcls" => parent::generatePlProvidedAcls(self::getAttributesInfo())
'plShortName' => _('Argonaut Fuse LTSP module settings'),
'plDescription' => _('Argonaut Fuse LTSP module settings').' ('._('Services').')',
'plCategory' => array('server'),
'plObjectType' => array('fusemodule'),
'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo())
);
}
......@@ -55,9 +55,4 @@ class argonautFuseLTSPConfig extends simplePlugin
)
);
}
function __construct($unused, $dn, $object = NULL, $attributesInfo = NULL)
{
parent::__construct($unused, $dn, $object, $attributesInfo);
}
}
......@@ -70,9 +70,4 @@ class argonautFuseOPSIConfig extends simplePlugin
)
);
}
function __construct($unused, $dn, $object = NULL, $attributesInfo = NULL)
{
parent::__construct($unused, $dn, $object, $attributesInfo);
}
}
......@@ -20,7 +20,7 @@
class argonautMirrorConfig extends simpleService
{
var $objectclasses = array("argonautMirrorConfig");
var $objectclasses = array('argonautMirrorConfig');
var $showActions = FALSE;
static function plInfo()
......
......@@ -127,9 +127,9 @@ class argonautServer extends simpleService
);
}
function __construct($unused, $dn = NULL, $object = NULL)
function __construct ($dn = NULL, $parent = NULL)
{
parent::__construct($unused, $dn, $object);
parent::__construct($dn, $parent);
if ($this->argonautServerToken == '') {
$this->argonautServerToken = md5(mt_rand());
}
......
......@@ -67,9 +67,9 @@ class nisObject extends simplePlugin
);
}
function __construct($unused, $dn = NULL, $object = NULL)
function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE)
{
parent::__construct($unused, $dn, $object);
parent::__construct($dn, $object, $parent, $mainTab);
$this->attributesAccess['nisMapName']->setChoices($this->getMountPoints());
}
......
......@@ -141,10 +141,5 @@ class userCertificates extends simplePlugin
),
);
}
function __construct ($unused, $dn = NULL, $object = NULL)
{
parent::__construct($unused, $dn, $object);
}
}
?>
......@@ -94,10 +94,5 @@ class communityOrganization extends simplePlugin
),
);
}
function __construct($unused, $dn = NULL, $object = NULL)
{
parent::__construct($unused, $dn, $object);
}
}
?>
......@@ -55,10 +55,5 @@ class communityProject extends communityOrganization
parent::getAttributesInfo()
);
}
function __construct($unused, $dn = NULL, $object = NULL)
{
parent::__construct($unused, $dn, $object);
}
}
?>
......@@ -35,15 +35,6 @@ class serviceCyrus extends simpleService
);
}
/*!
* \brief Constructor of the freeradiusAccount
* It will build the select groups choices
*/
function __construct($unused, $dn = NULL, $object = NULL)
{
parent::__construct($unused, $dn, $object);
}
/*!
* \brief The main function : information about attributes
*/
......
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2003-2010 Cajus Pollmeier
......@@ -22,7 +21,6 @@
class mailMethodCyrus extends mailMethod
{
protected $ServerList = array();
protected $imap_handle = NULL;
protected $quota_loaded = FALSE;
......@@ -47,7 +45,6 @@ class mailMethodCyrus extends mailMethod
$this->ServerList = parent::getMailServers();
}
public function connect()
{
global $config;
......@@ -105,7 +102,6 @@ class mailMethodCyrus extends mailMethod
return TRUE;
}
public function account_exists()
{
if (!$this->is_connected() || !$this->imap_handle) {
......@@ -663,5 +659,4 @@ class mailMethodCyrus extends mailMethod
return $serverList;
}
}
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment