From eac278086060fb4553c44fe04c88a4b3a189114c Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Fri, 28 Dec 2007 16:08:56 +0000 Subject: [PATCH] use __construct() --- lam/lib/baseModule.inc | 2 +- lam/lib/cache.inc | 2 +- lam/lib/config.inc | 6 +++--- lam/lib/lamPDF.inc | 2 +- lam/lib/ldap.inc | 2 +- lam/lib/lists.inc | 14 +++++++------- lam/lib/modules.inc | 2 +- lam/lib/modules/kolabUser.inc | 4 ++-- lam/lib/modules/sambaAccount.inc | 20 ++++++++++---------- lam/lib/modules/sambaGroupMapping.inc | 4 ++-- lam/lib/modules/sambaSamAccount.inc | 18 +++++++++--------- lam/lib/selfService.inc | 2 +- lam/lib/types/group.inc | 4 ++-- lam/lib/types/host.inc | 4 ++-- lam/lib/types/mailAlias.inc | 4 ++-- lam/lib/types/smbDomain.inc | 4 ++-- lam/lib/types/user.inc | 4 ++-- lam/lib/xml_parser.inc | 4 ++-- 18 files changed, 51 insertions(+), 51 deletions(-) diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index bec281f5..0cdee5d6 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -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(); diff --git a/lam/lib/cache.inc b/lam/lib/cache.inc index 813d805d..a52ca548 100644 --- a/lam/lib/cache.inc +++ b/lam/lib/cache.inc @@ -53,7 +53,7 @@ class cache { * * @return cache cache object */ - function cache() { + function __construct() { $this->time = 0; $this->attributes = array(); } diff --git a/lam/lib/config.inc b/lam/lib/config.inc index 6b156fd5..c6a2c708 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -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; diff --git a/lam/lib/lamPDF.inc b/lam/lib/lamPDF.inc index 041a7b2d..ffcfbe70 100644 --- a/lam/lib/lamPDF.inc +++ b/lam/lib/lamPDF.inc @@ -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 diff --git a/lam/lib/ldap.inc b/lam/lib/ldap.inc index d5fe3922..08448a14 100644 --- a/lam/lib/ldap.inc +++ b/lam/lib/ldap.inc @@ -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; diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc index 0dcdef5b..d3b30161 100644 --- a/lam/lib/lists.inc +++ b/lam/lib/lists.inc @@ -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; } diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 3d7cc02d..794fe6b3 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -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 */ diff --git a/lam/lib/modules/kolabUser.inc b/lam/lib/modules/kolabUser.inc index 236398aa..45fa63a0 100644 --- a/lam/lib/modules/kolabUser.inc +++ b/lam/lib/modules/kolabUser.inc @@ -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); } /** diff --git a/lam/lib/modules/sambaAccount.inc b/lam/lib/modules/sambaAccount.inc index 1dd6cb84..a1dc1f49 100644 --- a/lam/lib/modules/sambaAccount.inc +++ b/lam/lib/modules/sambaAccount.inc @@ -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 diff --git a/lam/lib/modules/sambaGroupMapping.inc b/lam/lib/modules/sambaGroupMapping.inc index 871876bc..7c9a720a 100644 --- a/lam/lib/modules/sambaGroupMapping.inc +++ b/lam/lib/modules/sambaGroupMapping.inc @@ -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; } diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index a0c2b638..07fc2001 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -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 diff --git a/lam/lib/selfService.inc b/lam/lib/selfService.inc index 8e2007d4..2a928883 100644 --- a/lam/lib/selfService.inc +++ b/lam/lib/selfService.inc @@ -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"; diff --git a/lam/lib/types/group.inc b/lam/lib/types/group.inc index 13aeed2b..9e51098d 100644 --- a/lam/lib/types/group.inc +++ b/lam/lib/types/group.inc @@ -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!"), diff --git a/lam/lib/types/host.inc b/lam/lib/types/host.inc index 05c0eca7..75e9dca2 100644 --- a/lam/lib/types/host.inc +++ b/lam/lib/types/host.inc @@ -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!"), diff --git a/lam/lib/types/mailAlias.inc b/lam/lib/types/mailAlias.inc index 46915769..feb1d8c3 100644 --- a/lam/lib/types/mailAlias.inc +++ b/lam/lib/types/mailAlias.inc @@ -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!"), diff --git a/lam/lib/types/smbDomain.inc b/lam/lib/types/smbDomain.inc index dbc8b3ff..3f2859cd 100644 --- a/lam/lib/types/smbDomain.inc +++ b/lam/lib/types/smbDomain.inc @@ -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!"), diff --git a/lam/lib/types/user.inc b/lam/lib/types/user.inc index f3b7199e..1717b909 100644 --- a/lam/lib/types/user.inc +++ b/lam/lib/types/user.inc @@ -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!"), diff --git a/lam/lib/xml_parser.inc b/lam/lib/xml_parser.inc index fe529ee5..cab78d20 100644 --- a/lam/lib/xml_parser.inc +++ b/lam/lib/xml_parser.inc @@ -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);