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