use __construct()
This commit is contained in:
parent
20b227c5b2
commit
eac2780860
|
@ -71,7 +71,7 @@ abstract class baseModule {
|
|||
*
|
||||
* @param string $scope the account type (user, group, host)
|
||||
*/
|
||||
function baseModule($scope) {
|
||||
public function __construct($scope) {
|
||||
$this->scope = $scope;
|
||||
$this->load_Messages();
|
||||
$this->meta = $this->get_metaData();
|
||||
|
|
|
@ -53,7 +53,7 @@ class cache {
|
|||
*
|
||||
* @return cache cache object
|
||||
*/
|
||||
function cache() {
|
||||
function __construct() {
|
||||
$this->time = 0;
|
||||
$this->attributes = array();
|
||||
}
|
||||
|
|
|
@ -195,7 +195,7 @@ class LAMConfig {
|
|||
/**
|
||||
* The rights for the home directory
|
||||
*/
|
||||
var $scriptRights;
|
||||
var $scriptRights = '750';
|
||||
|
||||
/**
|
||||
* Servers where lamdaemon script is executed
|
||||
|
@ -225,7 +225,7 @@ class LAMConfig {
|
|||
*
|
||||
* @param integer $file Index number in config file array
|
||||
*/
|
||||
function LAMConfig($file = 0) {
|
||||
function __construct($file = 0) {
|
||||
// load first profile if none is given
|
||||
if (!is_string($file)) {
|
||||
$profiles = getConfigProfiles();
|
||||
|
@ -872,7 +872,7 @@ class LAMCfgMain {
|
|||
/**
|
||||
* Loads preferences from config file
|
||||
*/
|
||||
function LAMCfgMain() {
|
||||
function __construct() {
|
||||
// set default values
|
||||
$this->sessionTimeout = 30;
|
||||
$this->logLevel = LOG_NOTICE;
|
||||
|
|
|
@ -61,7 +61,7 @@ class lamPDF extends UFPDF {
|
|||
* @param string $account_type
|
||||
* @param array $page_definitions
|
||||
*/
|
||||
function lamPDF($account_type = "user",$page_definitions = array(),$fontName) {
|
||||
function __construct($account_type = "user",$page_definitions = array(),$fontName) {
|
||||
$this->fontName = $fontName;
|
||||
define('FPDF_FONTPATH', $_SESSION['lampath'] . "lib/" . 'font/');
|
||||
// Call constructor of superclass
|
||||
|
|
|
@ -70,7 +70,7 @@ class Ldap{
|
|||
/**
|
||||
* @param object $config an object of class Config
|
||||
*/
|
||||
function Ldap($config) {
|
||||
function __construct($config) {
|
||||
setlanguage();
|
||||
if (is_object($config)) $this->conf = $config;
|
||||
else return false;
|
||||
|
|
|
@ -97,7 +97,7 @@ class lamList {
|
|||
* @param string $type account type
|
||||
* @return lamList list object
|
||||
*/
|
||||
public function lamList($type) {
|
||||
public function __construct($type) {
|
||||
$this->type = $type;
|
||||
$this->labels = array(
|
||||
'nav' => _("%s object(s) found"),
|
||||
|
@ -944,7 +944,7 @@ class lamListTool {
|
|||
* @param String $target target page
|
||||
* @return lamListTool tool object
|
||||
*/
|
||||
public function lamListTool($name, $image, $target) {
|
||||
public function __construct($name, $image, $target) {
|
||||
$this->name = $name;
|
||||
$this->image = $image;
|
||||
$this->target = $target;
|
||||
|
@ -1000,7 +1000,7 @@ abstract class lamListOption {
|
|||
* @param String $ID unique ID
|
||||
* @return lamConfigOption config option
|
||||
*/
|
||||
public function lamConfigOption($ID) {
|
||||
public function __construct($ID) {
|
||||
$this->ID = $ID;
|
||||
}
|
||||
|
||||
|
@ -1067,8 +1067,8 @@ class lamBooleanListOption extends lamListOption {
|
|||
* @param String $ID unique ID
|
||||
* @return lamBooleanListOption config option
|
||||
*/
|
||||
public function lamBooleanListOption($name, $ID) {
|
||||
parent::lamConfigOption($ID);
|
||||
public function __construct($name, $ID) {
|
||||
parent::__construct($ID);
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
|
@ -1131,8 +1131,8 @@ class lamSelectListOption extends lamListOption {
|
|||
* @param String $ID unique ID
|
||||
* @return lamBooleanListOption config option
|
||||
*/
|
||||
public function lamSelectListOption($name, $options, $ID) {
|
||||
parent::lamConfigOption($ID);
|
||||
public function __construct($name, $options, $ID) {
|
||||
parent::__construct($ID);
|
||||
$this->name = $name;
|
||||
$this->options = $options;
|
||||
}
|
||||
|
|
|
@ -735,7 +735,7 @@ class accountContainer {
|
|||
* @param string $type account type
|
||||
* @param string $base key in $_SESSION where this object is saved
|
||||
*/
|
||||
function accountContainer($type, $base) {
|
||||
function __construct($type, $base) {
|
||||
/* Set the type of account. Valid
|
||||
* types are: user, group, host
|
||||
*/
|
||||
|
|
|
@ -42,7 +42,7 @@ class kolabUser extends baseModule {
|
|||
*
|
||||
* @param string $scope account type (user, group, host)
|
||||
*/
|
||||
function kolabUser($scope) {
|
||||
function __construct($scope) {
|
||||
// list of invitation policies
|
||||
$this->invitationPolicies = array(
|
||||
'ACT_ALWAYS_ACCEPT' => _('Always accept'),
|
||||
|
@ -52,7 +52,7 @@ class kolabUser extends baseModule {
|
|||
'ACT_MANUAL_IF_CONFLICTS' => _('Manual if conflicts')
|
||||
);
|
||||
// call parent constructor
|
||||
parent::baseModule($scope);
|
||||
parent::__construct($scope);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,16 +42,16 @@ class sambaAccount extends baseModule {
|
|||
*
|
||||
* @param string $scope account type (user, group, host)
|
||||
*/
|
||||
function sambaAccount($scope) {
|
||||
// List of well known rids
|
||||
$this->rids = array(
|
||||
_('Domain admins') => 512, _('Domain users') => 513,
|
||||
_('Domain guests') => 514, _('Domain computers') => 515,
|
||||
_('Domain controllers') => 516, _('Domain certificate admins') => 517,
|
||||
_('Domain schema admins') => 518, _('Domain enterprise admins') => 519,
|
||||
_('Domain policy admins') => 520 );
|
||||
// call parent constructor
|
||||
parent::baseModule($scope);
|
||||
public function __construct($scope) {
|
||||
// List of well known rids
|
||||
$this->rids = array(
|
||||
_('Domain admins') => 512, _('Domain users') => 513,
|
||||
_('Domain guests') => 514, _('Domain computers') => 515,
|
||||
_('Domain controllers') => 516, _('Domain certificate admins') => 517,
|
||||
_('Domain schema admins') => 518, _('Domain enterprise admins') => 519,
|
||||
_('Domain policy admins') => 520 );
|
||||
// call parent constructor
|
||||
parent::__construct($scope);
|
||||
}
|
||||
|
||||
/** this functin fills the error message array with messages
|
||||
|
|
|
@ -49,7 +49,7 @@ class sambaGroupMapping extends baseModule {
|
|||
*
|
||||
* @param string $scope account type
|
||||
*/
|
||||
function sambaGroupMapping($scope) {
|
||||
function __construct($scope) {
|
||||
// load error messages
|
||||
$this->rids = array(
|
||||
_('Domain admins') => 512,
|
||||
|
@ -72,7 +72,7 @@ class sambaGroupMapping extends baseModule {
|
|||
_('Invalid account') => 7
|
||||
);
|
||||
// call parent constructor
|
||||
parent::baseModule($scope);
|
||||
parent::__construct($scope);
|
||||
$this->autoAddObjectClasses = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,15 +63,15 @@ class sambaSamAccount extends baseModule {
|
|||
*
|
||||
* @param string $scope account type (user, group, host)
|
||||
*/
|
||||
function sambaSamAccount($scope) {
|
||||
// List of well known rids
|
||||
$this->rids = array(
|
||||
_('Domain admins') => 512, _('Domain users') => 513, _('Domain guests') => 514,
|
||||
_('Domain computers') => 515, _('Domain controllers') => 516, _('Domain certificate admins') => 517,
|
||||
_('Domain schema admins') => 518, _('Domain enterprise admins') => 519, _('Domain policy admins') => 520);
|
||||
// call parent constructor
|
||||
parent::baseModule($scope);
|
||||
$this->autoAddObjectClasses = false;
|
||||
function __construct($scope) {
|
||||
// List of well known rids
|
||||
$this->rids = array(
|
||||
_('Domain admins') => 512, _('Domain users') => 513, _('Domain guests') => 514,
|
||||
_('Domain computers') => 515, _('Domain controllers') => 516, _('Domain certificate admins') => 517,
|
||||
_('Domain schema admins') => 518, _('Domain enterprise admins') => 519, _('Domain policy admins') => 520);
|
||||
// call parent constructor
|
||||
parent::__construct($scope);
|
||||
$this->autoAddObjectClasses = false;
|
||||
}
|
||||
|
||||
/** this functin fills the error message array with messages
|
||||
|
|
|
@ -292,7 +292,7 @@ class selfServiceProfile {
|
|||
*
|
||||
* @return selfServiceProfile
|
||||
*/
|
||||
function selfServiceProfile() {
|
||||
function __construct() {
|
||||
// set default values
|
||||
$this->serverURL = "localhost";
|
||||
$this->LDAPSuffix = "dc=my-domain,dc=com";
|
||||
|
|
|
@ -114,8 +114,8 @@ class lamGroupList extends lamList {
|
|||
* @param string $type account type
|
||||
* @return lamList list object
|
||||
*/
|
||||
function lamGroupList($type) {
|
||||
parent::lamList($type);
|
||||
function __construct($type) {
|
||||
parent::__construct($type);
|
||||
$this->labels = array(
|
||||
'nav' => _("%s group(s) found"),
|
||||
'error_noneFound' => _("No groups found!"),
|
||||
|
|
|
@ -106,8 +106,8 @@ class lamHostList extends lamList {
|
|||
* @param string $type account type
|
||||
* @return lamList list object
|
||||
*/
|
||||
function lamHostList($type) {
|
||||
parent::lamList($type);
|
||||
function __construct($type) {
|
||||
parent::__construct($type);
|
||||
$this->labels = array(
|
||||
'nav' => _("%s host(s) found"),
|
||||
'error_noneFound' => _("No hosts found!"),
|
||||
|
|
|
@ -102,8 +102,8 @@ class lamMailAliasList extends lamList {
|
|||
* @param string $type account type
|
||||
* @return lamList list object
|
||||
*/
|
||||
function lamMailAliasList($type) {
|
||||
parent::lamList($type);
|
||||
function __construct($type) {
|
||||
parent::__construct($type);
|
||||
$this->labels = array(
|
||||
'nav' => _("%s alias(es) found"),
|
||||
'error_noneFound' => _("No aliases found!"),
|
||||
|
|
|
@ -102,8 +102,8 @@ class lamSmbDomainList extends lamList {
|
|||
* @param string $type account type
|
||||
* @return lamList list object
|
||||
*/
|
||||
function lamSmbDomainList($type) {
|
||||
parent::lamList($type);
|
||||
function __construct($type) {
|
||||
parent::__construct($type);
|
||||
$this->labels = array(
|
||||
'nav' => _("%s domain(s) found"),
|
||||
'error_noneFound' => _("No domains found!"),
|
||||
|
|
|
@ -120,8 +120,8 @@ class lamUserList extends lamList {
|
|||
* @param string $type account type
|
||||
* @return lamList list object
|
||||
*/
|
||||
public function lamUserList($type) {
|
||||
parent::lamList($type);
|
||||
public function __construct($type) {
|
||||
parent::__construct($type);
|
||||
$this->labels = array(
|
||||
'nav' => _("%s user(s) found"),
|
||||
'error_noneFound' => _("No users found!"),
|
||||
|
|
|
@ -41,9 +41,9 @@ class xmlParser {
|
|||
private $xmlParser;
|
||||
|
||||
/**
|
||||
*
|
||||
* Constructor
|
||||
*/
|
||||
function xmlParser() {
|
||||
function __construct() {
|
||||
$this->xmlParser = xml_parser_create();
|
||||
xml_set_object($this->xmlParser,$this);
|
||||
xml_parser_set_option($this->xmlParser, XML_OPTION_CASE_FOLDING, 1);
|
||||
|
|
Loading…
Reference in New Issue