diff --git a/html/getbin.php b/html/getbin.php index be08b95f36e991dd4ae631d35324294d33a54bfa..40c472ff4de83914a113d369368167ee649339ef 100644 --- a/html/getbin.php +++ b/html/getbin.php @@ -20,12 +20,12 @@ */ /* Basic setup, remove eventually registered sessions */ -@require_once("../include/php_setup.inc"); -@require_once("functions.inc"); -@require_once("variables.inc"); +@require_once('../include/php_setup.inc'); +@require_once('functions.inc'); +@require_once('variables.inc'); error_reporting (0); -session_cache_limiter("private"); +session_cache_limiter('private'); session::start(); session::global_set('errorsAlreadyPosted', array()); @@ -36,23 +36,21 @@ if (!session::global_is_set('ui')) { exit; } -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); -header("Cache-Control: no-cache"); -header("Pragma: no-cache"); -header("Cache-Control: post-check=0, pre-check=0"); +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-cache'); +header('Pragma: no-cache'); +header('Cache-Control: post-check=0, pre-check=0'); $key = 'binary'; if (isset ($_GET['key'])) { $key .= $_GET['key']; } -$bintype = session::is_set($key.'type') - ? session::get($key.'type') : "octet-stream"; -header("Content-type: " . $bintype); +$bintype = (session::is_set($key.'type') ? session::get($key.'type') : 'octet-stream'); +header('Content-type: '.$bintype); if (session::is_set($key.'file')) { - header( 'Content-disposition: attachment; filename="' - . session::get($key.'file')).'"'; + header('Content-disposition: attachment; filename="'.session::get($key.'file').'"'); } echo session::get($key); diff --git a/html/index.php b/html/index.php index 670368ffe6a5c7633f4e0dd29de3ce9a1a1efd1b..123d201139fe0a6d3ca673e51434a35359041612 100644 --- a/html/index.php +++ b/html/index.php @@ -230,8 +230,8 @@ class Index { static function init() { - self::$username = NULL; - self::$password = NULL; + static::$username = NULL; + static::$password = NULL; } /* Runs schemaCheck if activated in configuration */ @@ -273,11 +273,11 @@ class Index { static function validateUserInput() { global $message, $smarty; - self::$username = trim(self::$username); - if (!preg_match('/^[@A-Za-z0-9_.-]+$/', self::$username)) { + static::$username = trim(static::$username); + if (!preg_match('/^[@A-Za-z0-9_.-]+$/', static::$username)) { $message = _('Please specify a valid username!'); return FALSE; - } elseif (mb_strlen(self::$password, 'UTF-8') == 0) { + } elseif (mb_strlen(static::$password, 'UTF-8') == 0) { $message = _('Please specify your password!'); $smarty->assign ('focusfield', 'password'); return FALSE; @@ -290,12 +290,12 @@ class Index { { global $ui, $config, $message, $smarty; /* Login as user, initialize user ACL's */ - $ui = ldap_login_user(self::$username, self::$password); + $ui = ldap_login_user(static::$username, static::$password); if ($ui === NULL) { if (isset($_SERVER['REMOTE_ADDR'])) { - logging::log('security', 'login', '', array(), 'Authentication failed for user "'.self::$username.'" [from '.$_SERVER['REMOTE_ADDR'].']'); + logging::log('security', 'login', '', array(), 'Authentication failed for user "'.static::$username.'" [from '.$_SERVER['REMOTE_ADDR'].']'); } else { - logging::log('security', 'login', '', array(), 'Authentication failed for user "'.self::$username.'"'); + logging::log('security', 'login', '', array(), 'Authentication failed for user "'.static::$username.'"'); } $message = _('Please check the username/password combination.'); $smarty->assign ('focusfield', 'password'); @@ -326,7 +326,7 @@ class Index { $expired = $ui->expired_status(); if ($expired == POSIX_ACCOUNT_EXPIRED) { - logging::log('security', 'login', '', array(), 'Account for user "'.self::$username.'" has expired'); + logging::log('security', 'login', '', array(), 'Account for user "'.static::$username.'" has expired'); $message = _('Account locked. Please contact your system administrator!'); $smarty->assign ('focusfield', 'username'); return FALSE; @@ -340,7 +340,7 @@ class Index { { global $config; /* Not account expired or password forced change go to main page */ - logging::log('security', 'login', '', array(), 'User "'.self::$username.'" logged in successfully.'); + logging::log('security', 'login', '', array(), 'User "'.static::$username.'" logged in successfully.'); session::global_set('connected', 1); $config->checkLdapConfig(); // check that newly installed plugins have their configuration in the LDAP session::global_set('DEBUGLEVEL', $config->get_cfg_value('DEBUGLEVEL')); @@ -361,7 +361,7 @@ class Index { static function runSteps($steps) { foreach($steps as $step) { - $status = self::$step(); + $status = static::$step(); if (is_string($status)) { msg_dialog::display(_('LDAP error'), $status, LDAP_ERROR); return FALSE; @@ -377,15 +377,15 @@ class Index { { global $config, $message; - self::init(); + static::init(); /* Reset error messages */ $message = ''; - self::$username = $_POST['username']; - self::$password = $_POST['password']; + static::$username = $_POST['username']; + static::$password = $_POST['password']; - $success = self::runSteps(array( + $success = static::runSteps(array( 'validateUserInput', 'ldapLoginUser', 'loginAndCheckExpired', @@ -395,7 +395,7 @@ class Index { if ($success) { /* Everything went well, redirect to main.php */ - self::redirect(); + static::redirect(); } } @@ -404,16 +404,16 @@ class Index { { global $config, $message, $ui; - self::init(); + static::init(); if (!isset($_SERVER['PHP_AUTH_USER'])) { - self::authenticateHeader(); + static::authenticateHeader(); } - self::$username = $_SERVER['PHP_AUTH_USER']; - self::$password = $_SERVER['PHP_AUTH_PW']; + static::$username = $_SERVER['PHP_AUTH_USER']; + static::$password = $_SERVER['PHP_AUTH_PW']; - $success = self::runSteps(array( + $success = static::runSteps(array( 'validateUserInput', 'ldapLoginUser', 'loginAndCheckExpired', @@ -423,9 +423,9 @@ class Index { if ($success) { /* Everything went well, redirect to main.php */ - self::redirect(); + static::redirect(); } else { - self::authenticateHeader($message); + static::authenticateHeader($message); } } @@ -434,16 +434,16 @@ class Index { { global $config, $message, $ui; - self::init(); + static::init(); /* Reset error messages */ $message = ''; $header = $config->get_cfg_value('httpHeaderAuthHeaderName', 'AUTH_USER'); - self::$username = $_SERVER['HTTP_'.$header]; + static::$username = $_SERVER['HTTP_'.$header]; - if (!self::$username) { + if (!static::$username) { msg_dialog::display( _('Error'), sprintf( @@ -460,7 +460,7 @@ class Index { $verify_attr = explode(',', $config->get_cfg_value('loginAttribute', 'uid')); $filter = ''; foreach ($verify_attr as $attr) { - $filter .= '('.$attr.'='.ldap_escape_f(self::$username).')'; + $filter .= '('.$attr.'='.ldap_escape_f(static::$username).')'; } $ldap->search('(&(|'.$filter.')(objectClass=inetOrgPerson))'); $attrs = $ldap->fetch(); @@ -469,7 +469,7 @@ class Index { _('Error'), sprintf( _('Header user "%s" could not be found in the LDAP'), - self::$username + static::$username ), FATAL_ERROR_DIALOG ); @@ -479,7 +479,7 @@ class Index { _('Error'), sprintf( _('Header user "%s" match several users in the LDAP'), - self::$username + static::$username ), FATAL_ERROR_DIALOG ); @@ -488,7 +488,7 @@ class Index { $ui = new userinfo($config, $attrs['dn']); $ui->loadACL(); - $success = self::runSteps(array( + $success = static::runSteps(array( 'loginAndCheckExpired', 'runSchemaCheck', 'checkForLockingBranch', @@ -496,7 +496,7 @@ class Index { if ($success) { /* Everything went well, redirect to main.php */ - self::redirect(); + static::redirect(); } } @@ -505,7 +505,7 @@ class Index { { global $config, $message, $ui; - self::init(); + static::init(); /* Reset error messages */ $message = ''; @@ -526,13 +526,13 @@ class Index { // force CAS authentication phpCAS::forceAuthentication(); - self::$username = phpCAS::getUser(); + static::$username = phpCAS::getUser(); $ldap = $config->get_ldap_link(); $ldap->cd($config->current['BASE']); $verify_attr = explode(',', $config->get_cfg_value('loginAttribute', 'uid')); $filter = ''; foreach ($verify_attr as $attr) { - $filter .= '('.$attr.'='.ldap_escape_f(self::$username).')'; + $filter .= '('.$attr.'='.ldap_escape_f(static::$username).')'; } $ldap->search('(&(|'.$filter.')(objectClass=inetOrgPerson))'); $attrs = $ldap->fetch(); @@ -541,7 +541,7 @@ class Index { _('Error'), sprintf( _('CAS user "%s" could not be found in the LDAP'), - self::$username + static::$username ), FATAL_ERROR_DIALOG ); @@ -551,7 +551,7 @@ class Index { _('Error'), sprintf( _('CAS user "%s" match several users in the LDAP'), - self::$username + static::$username ), FATAL_ERROR_DIALOG ); @@ -560,7 +560,7 @@ class Index { $ui = new userinfo($config, $attrs['dn']); $ui->loadACL(); - $success = self::runSteps(array( + $success = static::runSteps(array( 'loginAndCheckExpired', 'runSchemaCheck', 'checkForLockingBranch', @@ -568,7 +568,7 @@ class Index { if ($success) { /* Everything went well, redirect to main.php */ - self::redirect(); + static::redirect(); } } } diff --git a/include/class_CopyPasteHandler.inc b/include/class_CopyPasteHandler.inc index 737f0538783b57fb7e10de4751d791a540836aaa..91a581272374ae1795aa45d43155f19bca73c8f6 100644 --- a/include/class_CopyPasteHandler.inc +++ b/include/class_CopyPasteHandler.inc @@ -197,9 +197,9 @@ class CopyPasteHandler $cut_acl &= preg_match("/r/", $ui->get_complete_category_acls($entry['dn'], $entry['tab_acl_category'])); /* Check permissions */ - if ($entry['method'] == "copy" && !$copy_acl) { + if (($entry['method'] == 'copy') && !$copy_acl) { $this->disallowed_objects[$key] = $entry; - } elseif ($entry['method'] == "cut" && !$cut_acl) { + } elseif (($entry['method'] == 'cut') && !$cut_acl) { $this->disallowed_objects[$key] = $entry; } else { $this->clean_objects[$key] = $entry; diff --git a/include/class_IconTheme.inc b/include/class_IconTheme.inc index b7874729d6804f379f1692fef8251c0545a82ebd..1d10ed5de0a223ecf339edc0c120f7f69c969209 100644 --- a/include/class_IconTheme.inc +++ b/include/class_IconTheme.inc @@ -111,8 +111,8 @@ class IconTheme if ($filename != NULL) { return $filename; } - if (isset(self::$fallbacks[$context.'/'.$icon])) { - foreach (self::$fallbacks[$context.'/'.$icon] as $fallback) { + if (isset(static::$fallbacks[$context.'/'.$icon])) { + foreach (static::$fallbacks[$context.'/'.$icon] as $fallback) { $filename = $this->LookupIcon($fallback[0], $fallback[1], $size); if ($filename != NULL) { return $filename; @@ -123,7 +123,7 @@ class IconTheme if ($this->parent !== NULL) { $parent = $this->findTheme($this->parent); if ($parent === NULL) { - $parent = $this->findTheme(self::$default_theme); + $parent = $this->findTheme(static::$default_theme); } return $parent->FindIconHelper($context, $icon, $size); } @@ -138,7 +138,7 @@ class IconTheme } foreach ($this->subdirs[$context] as $path => &$subdir) { if ($subdir->MatchesSize($size)) { - foreach (self::$extensions as $extension) { + foreach (static::$extensions as $extension) { $filename = $this->path.'/'.$path.'/'.$iconname.'.'.$extension; if (file_exists($filename)) { return $filename; @@ -147,11 +147,11 @@ class IconTheme } } unset($subdir); - if (self::$find_closest) { + if (static::$find_closest) { $minimal_size = PHP_INT_MAX; foreach ($this->subdirs[$context] as $path => &$subdir) { if (($sizedistance = $subdir->SizeDistance($size)) < $minimal_size) { - foreach (self::$extensions as $extension) { + foreach (static::$extensions as $extension) { $filename = $this->path.'/'.$path.'/'.$iconname.'.'.$extension; if (file_exists($filename)) { $closest_filename = $filename; @@ -181,32 +181,32 @@ class IconTheme while (($file = readdir($dir)) !== FALSE) { if (file_exists("$path/$file/index.theme") && !preg_match("/^\./", $file)) { try { - if ($file == self::$default_theme) { + if ($file == static::$default_theme) { $themes[$file] = new IconTheme("$path/$file", NULL); } else { - $themes[$file] = new IconTheme("$path/$file", self::$default_theme); + $themes[$file] = new IconTheme("$path/$file", static::$default_theme); } } catch (Exception $e) { } } } } - $_SESSION[self::$session_var] = $themes; + $_SESSION[static::$session_var] = $themes; } static public function findThemeIcon($theme, $context, $icon, $size) { - if (!isset($_SESSION[self::$session_var])) { + if (!isset($_SESSION[static::$session_var])) { die('Error: no theme found in session'); } - if (isset($_SESSION[self::$session_var][$theme])) { - return $_SESSION[self::$session_var][$theme]->FindIcon($context, $icon, $size); + if (isset($_SESSION[static::$session_var][$theme])) { + return $_SESSION[static::$session_var][$theme]->FindIcon($context, $icon, $size); } - return $_SESSION[self::$session_var][self::$default_theme]->FindIcon($context, $icon, $size); + return $_SESSION[static::$session_var][static::$default_theme]->FindIcon($context, $icon, $size); } public function findTheme($theme) { - if (isset($_SESSION[self::$session_var][$theme])) { - $ret = &$_SESSION[self::$session_var][$theme]; + if (isset($_SESSION[static::$session_var][$theme])) { + $ret = &$_SESSION[static::$session_var][$theme]; return $ret; } return NULL; diff --git a/include/class_acl.inc b/include/class_acl.inc index 1f27d5f15e546b70120092c74ce231fd10ad2edd..ec61c4d42a8adc739ff1c6ee7f3f79606959a0aa 100644 --- a/include/class_acl.inc +++ b/include/class_acl.inc @@ -84,7 +84,7 @@ class acl $result = array(); foreach ($role as $aclTemplate) { $list = explode(':', $aclTemplate, 2); - $result[$list[0]] = self::extractACL($list[1]); + $result[$list[0]] = static::extractACL($list[1]); } ksort($result); return $result; diff --git a/include/class_objects.inc b/include/class_objects.inc index a01114b53399261cdcb6fc240933f9b1296286c5..13ea96d1fe7765bcb850edc67a0df72220bafe57 100644 --- a/include/class_objects.inc +++ b/include/class_objects.inc @@ -42,7 +42,7 @@ class objects static function ls ($type, $attrs = NULL, $ou = NULL, $filter = '') { if ($attrs === NULL) { - $infos = self::infos($type); + $infos = static::infos($type); $attrs = $infos['mainAttr']; } @@ -52,7 +52,7 @@ class objects $search_attrs = array($attrs); } try { - $ldap = self::search($type, $search_attrs, $ou, $filter); + $ldap = static::search($type, $search_attrs, $ou, $filter); } catch (NonExistingBranchException $e) { return array(); } @@ -94,7 +94,7 @@ class objects static function count ($type, $ou = NULL, $filter = '') { try { - $ldap = self::search($type, array('dn'), $ou, $filter); + $ldap = static::search($type, array('dn'), $ou, $filter); } catch (EmptyFilterException $e) { return 0; } catch (NonExistingBranchException $e) { @@ -110,7 +110,7 @@ class objects if ($ou === NULL) { $ou = $config->current['BASE']; } - $infos = self::infos($type); + $infos = static::infos($type); if ($infos['filter'] == '') { throw new EmptyFilterException(); @@ -148,7 +148,7 @@ class objects { global $config; - $infos = self::infos($type); + $infos = static::infos($type); $tabClass = $infos['tabClass']; $tabObject = new $tabClass($type, $dn); @@ -162,7 +162,7 @@ class objects { global $config; - $infos = self::infos($type); + $infos = static::infos($type); if (!isset($infos['management'])) { throw new Exception('Asked for link for type "'.$type.'" but it does not have a management class'); } @@ -199,7 +199,7 @@ class objects static function create ($type) { - return self::open('new', $type); + return static::open('new', $type); } static function infos ($type) @@ -216,7 +216,7 @@ class objects static function isOfType ($attrs, $type) { //TODO : cache ldapFilter objects? - $infos = self::infos($type); + $infos = static::infos($type); $filter = ldapFilter::parse($infos['filter']); return $filter($attrs); } @@ -233,7 +233,7 @@ class objects { global $config, $ui; - $infos = self::infos($type); + $infos = static::infos($type); $templates = array(); $ldap = $config->get_ldap_link(); diff --git a/include/class_plugin.inc b/include/class_plugin.inc index dba44faf05e819df5d794c76461710c5c049d5e8..a8684b7175ae1d381cea0187be7b327c2964e952 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -225,7 +225,7 @@ class plugin if ($this->mainTab) { $this->_template_cn = $template_attrs['cn'][0]; } - $this->attrs = self::tpl_template_to_attrs($template_attrs); + $this->attrs = static::tpl_template_to_attrs($template_attrs); } protected function templateSaveAttrs() @@ -357,9 +357,9 @@ class plugin $ldap = $config->get_ldap_link(); $ldap->cat($dn); $attrs = $ldap->fetch(); - $attrs = self::tpl_template_to_attrs($attrs); - $depends = self::tpl_attrs_depends($attrs); - $attrs = self::tpl_sort_attrs($attrs, $depends); + $attrs = static::tpl_template_to_attrs($attrs); + $depends = static::tpl_attrs_depends($attrs); + $attrs = static::tpl_sort_attrs($attrs, $depends); return array($attrs, $depends); } @@ -528,7 +528,7 @@ class plugin } $result_tmp = array(); foreach ($result as $r) { - $result_tmp = array_merge($result_tmp, self::tpl_apply_modifier($modifier, $args, $r)); + $result_tmp = array_merge($result_tmp, static::tpl_apply_modifier($modifier, $args, $r)); } $result = $result_tmp; } @@ -604,7 +604,7 @@ class plugin /* Flattens dependencies */ $flatdepends = array(); foreach ($depends as $key => $value) { - self::tpl_depends_of($flatdepends, $depends, $key); + static::tpl_depends_of($flatdepends, $depends, $key); } return $flatdepends; } @@ -664,7 +664,7 @@ class plugin if (!is_numeric($key)) { continue; } - $string = self::tpl_parse_string($string, $attrs); + $string = static::tpl_parse_string($string, $attrs); } unset($string); } @@ -681,7 +681,7 @@ class plugin { $offset = 0; while (preg_match('/%([^%]+)%/', $string, $m, PREG_OFFSET_CAPTURE, $offset)) { - $replace = self::tpl_parse_mask($m[1][0], $attrs); + $replace = static::tpl_parse_mask($m[1][0], $attrs); $replace = $replace[0]; if ($escapeMethod !== NULL) { $replace = $escapeMethod($replace); @@ -968,7 +968,7 @@ class plugin $addAttrs['base'] = $this->base; } - $command = self::tpl_parse_string($command, $addAttrs, 'escapeshellarg'); + $command = static::tpl_parse_string($command, $addAttrs, 'escapeshellarg'); @DEBUG(DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); exec($command, $arr, $returnCode); diff --git a/include/class_timezone.inc b/include/class_timezone.inc index d65fd68979823cf82792382f91626d41575b5a42..5a63aa7fd0852c53390d73c1444fd6e4ffc5d1da 100644 --- a/include/class_timezone.inc +++ b/include/class_timezone.inc @@ -73,7 +73,7 @@ class timezone } /* Is there a correct timezone set in the fusiondirectory configuration */ - if (self::setDefaultTimezoneFromConfig()) { + if (static::setDefaultTimezoneFromConfig()) { $tz = $config->get_cfg_value('timezone'); $tz_delta = date('Z', $stamp); $tz_delta = $tz_delta / 3600; diff --git a/plugins/addons/dashboard/class_dashBoardUsers.inc b/plugins/addons/dashboard/class_dashBoardUsers.inc index 8efebea97c3f5d29c803555ad033af4f787791b2..7a44be070f27931dfc8c800235226aee7d17b8c1 100644 --- a/plugins/addons/dashboard/class_dashBoardUsers.inc +++ b/plugins/addons/dashboard/class_dashBoardUsers.inc @@ -147,9 +147,9 @@ class dashboardUsers extends simplePlugin while ($attrs = $ldap->fetch()) { // Test if account is expired now if ($attrs['shadowExpire'][0] <= $today) { - $expired_accounts[] = self::get_user_infos($attrs); + $expired_accounts[] = static::get_user_infos($attrs); } elseif ($attrs['shadowExpire'][0] <= $next_expired_date) { - $next_expired_accounts[] = self::get_user_infos($attrs); + $next_expired_accounts[] = static::get_user_infos($attrs); } } diff --git a/plugins/admin/acl/class_aclAssignment.inc b/plugins/admin/acl/class_aclAssignment.inc index 97e1b012006db0894a6a3a05327118266630ccb0..ab785338bd00fae594e3287c50c620af01244b17 100644 --- a/plugins/admin/acl/class_aclAssignment.inc +++ b/plugins/admin/acl/class_aclAssignment.inc @@ -27,7 +27,7 @@ class aclAssignmentDialogWindow extends simplePlugin 'plDescription' => _('Access control roles assignment dialog'), 'plCategory' => array('acl'), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } @@ -270,7 +270,7 @@ class aclAssignment extends simplePlugin ) ), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } diff --git a/plugins/admin/aclrole/class_aclRole.inc b/plugins/admin/aclrole/class_aclRole.inc index d8fc324fda82ab30743bb9e59eb2ee77ad99c68c..714d5d02c4fcd16ab2689e631586bc9f55827708 100644 --- a/plugins/admin/aclrole/class_aclRole.inc +++ b/plugins/admin/aclrole/class_aclRole.inc @@ -84,7 +84,7 @@ class aclRole extends simplePlugin 'icon' => 'geticon.php?context=categories&icon=acl&size=16', )), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } diff --git a/plugins/admin/departments/class_country.inc b/plugins/admin/departments/class_country.inc index 8c4f9c1e931d9faac4f0858ff132af6e33910720..16d2b4c831a26675a7fea37d72c5b83867eefa30 100644 --- a/plugins/admin/departments/class_country.inc +++ b/plugins/admin/departments/class_country.inc @@ -35,19 +35,19 @@ class country extends department 'ou' => '', 'icon' => 'geticon.php?context=types&icon=country&size=16', 'tabClass' => 'deptabs', - 'mainAttr' => self::$namingAttr, + 'mainAttr' => static::$namingAttr, )), 'plForeignKeys' => array( 'manager' => 'user' ), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } static function getAttributesInfo () { - $attributesInfo = parent::getDepartmentAttributesInfo(_('country'), self::$namingAttr); + $attributesInfo = parent::getDepartmentAttributesInfo(_('country'), static::$namingAttr); unset($attributesInfo['location']); unset($attributesInfo['properties']['attrs'][3]); // category /* Country c attribut cannot contain any underscore */ diff --git a/plugins/admin/departments/class_dcObject.inc b/plugins/admin/departments/class_dcObject.inc index 68551859a54fdae2a273cf60ace34a81a54dee34..b059a84730953b5ba95b096fe2e911e9f252755f 100644 --- a/plugins/admin/departments/class_dcObject.inc +++ b/plugins/admin/departments/class_dcObject.inc @@ -36,19 +36,19 @@ class dcObject extends department 'ou' => '', 'icon' => 'geticon.php?context=types&icon=dc&size=16', 'tabClass' => 'deptabs', - 'mainAttr' => self::$namingAttr, + 'mainAttr' => static::$namingAttr, )), 'plForeignKeys' => array( 'manager' => 'user' ), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } static function getAttributesInfo () { - $attributesInfo = parent::getDepartmentAttributesInfo(_('domain component'), self::$namingAttr); + $attributesInfo = parent::getDepartmentAttributesInfo(_('domain component'), static::$namingAttr); unset($attributesInfo['location']); unset($attributesInfo['properties']['attrs'][3]); // category return $attributesInfo; diff --git a/plugins/admin/departments/class_department.inc b/plugins/admin/departments/class_department.inc index 2966e464126fc201b180ea29df66d41b50b045b5..17c506fae3b29eed32196129a33476d226b740e2 100644 --- a/plugins/admin/departments/class_department.inc +++ b/plugins/admin/departments/class_department.inc @@ -41,20 +41,20 @@ class department extends simplePlugin 'ou' => '', 'icon' => 'geticon.php?context=places&icon=folder&size=16', 'tabClass' => 'deptabs', - 'mainAttr' => self::$namingAttr, + 'mainAttr' => static::$namingAttr, ) ), 'plForeignKeys' => array( 'manager' => 'user' ), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } static function getAttributesInfo() { - return self::getDepartmentAttributesInfo(_('department'), self::$namingAttr); + return static::getDepartmentAttributesInfo(_('department'), static::$namingAttr); } static function getDepartmentAttributesInfo($name, $namingAttr) { diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc index 20c250f4a3ffffb02cf4aa3985f501f36f415bba..b57f6f5035531b22da9a71e09938f1b3c9878b3f 100644 --- a/plugins/admin/departments/class_departmentManagement.inc +++ b/plugins/admin/departments/class_departmentManagement.inc @@ -37,7 +37,7 @@ class departmentManagement extends simpleManagement 'plIcon' => 'geticon.php?context=places&icon=folder&size=48', 'plSection' => array('accounts' => array('name' => _('Users and groups'), 'priority' => 0)), 'plPriority' => 0, - 'plManages' => self::getDepartmentTypes(), + 'plManages' => static::getDepartmentTypes(), 'plProvidedAcls' => array() ); @@ -45,7 +45,7 @@ class departmentManagement extends simpleManagement function __construct() { - $this->objectTypes = self::getDepartmentTypes(); + $this->objectTypes = static::getDepartmentTypes(); $this->listXMLPath = get_template_path('dep-list.xml', TRUE, dirname(__FILE__)); parent::__construct(); $this->headpage->registerElementFilter("depLabel", "departmentManagement::filterDepLabel"); diff --git a/plugins/admin/departments/class_domain.inc b/plugins/admin/departments/class_domain.inc index 8e50f5980aefc3da8a8d7042c433fdd3ec716aa7..100443897e3907c187f63afa7c0997c37cf2c433 100644 --- a/plugins/admin/departments/class_domain.inc +++ b/plugins/admin/departments/class_domain.inc @@ -36,19 +36,19 @@ class domain extends department 'ou' => '', 'icon' => 'geticon.php?context=types&icon=domain&size=16', 'tabClass' => 'deptabs', - 'mainAttr' => self::$namingAttr, + 'mainAttr' => static::$namingAttr, )), 'plForeignKeys' => array( 'manager' => 'user' ), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } static function getAttributesInfo () { - $attributesInfo = parent::getDepartmentAttributesInfo(_('domain'), self::$namingAttr); + $attributesInfo = parent::getDepartmentAttributesInfo(_('domain'), static::$namingAttr); unset($attributesInfo['location']); unset($attributesInfo['properties']['attrs'][3]); // category return $attributesInfo; diff --git a/plugins/admin/departments/class_locality.inc b/plugins/admin/departments/class_locality.inc index 8f94477506e2057c728536a92e52202c5bf22ac5..2377cc9ae159806a05994b7ae0849d16ae79e226 100644 --- a/plugins/admin/departments/class_locality.inc +++ b/plugins/admin/departments/class_locality.inc @@ -36,19 +36,19 @@ class locality extends department 'ou' => '', 'icon' => 'geticon.php?context=types&icon=locality&size=16', 'tabClass' => 'deptabs', - 'mainAttr' => self::$namingAttr, + 'mainAttr' => static::$namingAttr, )), 'plForeignKeys' => array( 'manager' => 'user' ), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } static function getAttributesInfo () { - $attributesInfo = parent::getDepartmentAttributesInfo(_('locality'), self::$namingAttr); + $attributesInfo = parent::getDepartmentAttributesInfo(_('locality'), static::$namingAttr); unset($attributesInfo['location']); unset($attributesInfo['properties']['attrs'][3]); // category return $attributesInfo; diff --git a/plugins/admin/departments/class_organization.inc b/plugins/admin/departments/class_organization.inc index b3a0ab4c59f92aa06371d1faa8307fdb6753b878..c5b0fde48f227099043887b34f20a122e9cd977b 100644 --- a/plugins/admin/departments/class_organization.inc +++ b/plugins/admin/departments/class_organization.inc @@ -36,19 +36,19 @@ class organization extends department 'ou' => '', 'icon' => 'geticon.php?context=types&icon=organization&size=16', 'tabClass' => 'deptabs', - 'mainAttr' => self::$namingAttr, + 'mainAttr' => static::$namingAttr, )), 'plForeignKeys' => array( 'manager' => 'user' ), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } static function getAttributesInfo () { - return parent::getDepartmentAttributesInfo(_('organization'), self::$namingAttr); + return parent::getDepartmentAttributesInfo(_('organization'), static::$namingAttr); } } ?> diff --git a/plugins/admin/groups/class_group.inc b/plugins/admin/groups/class_group.inc index ba63bb7f169a72f5c95de28fa770168f2372d9d2..35e09d2c534a65e72958d248ceff2256c8bb2cda 100644 --- a/plugins/admin/groups/class_group.inc +++ b/plugins/admin/groups/class_group.inc @@ -45,7 +45,7 @@ class group extends simplePlugin 'memberUid' => array('user','uid') ), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc index 779f94d64897ccda015f39e00896d2200de26037..6ed4eec6dc45a4ba584818fd18225c5e7000f32a 100644 --- a/plugins/admin/groups/class_groupManagement.inc +++ b/plugins/admin/groups/class_groupManagement.inc @@ -63,7 +63,7 @@ class groupManagement extends simpleManagement if (empty($gosaGroupObjects)) { return $result; } else { - return self::filterGroupObjects($row, $gosaGroupObjects); + return static::filterGroupObjects($row, $gosaGroupObjects); } } if (objects::isOfType($attrs, 'role')) { diff --git a/plugins/admin/groups/class_ogroup.inc b/plugins/admin/groups/class_ogroup.inc index 41da023390fef1eda746b712e93f64161e76939a..e44c21be41702621f722c75b5bfc2a1c2d35b9d2 100644 --- a/plugins/admin/groups/class_ogroup.inc +++ b/plugins/admin/groups/class_ogroup.inc @@ -178,7 +178,7 @@ class ogroup extends simplePlugin ) ), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } diff --git a/plugins/admin/groups/class_roleGeneric.inc b/plugins/admin/groups/class_roleGeneric.inc index 3f3bd7015b08dba3433c2f6ce8d777eea5478bf2..6af83a62033e9bf74bc52ecc7d63d1c922bc5bce 100644 --- a/plugins/admin/groups/class_roleGeneric.inc +++ b/plugins/admin/groups/class_roleGeneric.inc @@ -68,7 +68,7 @@ class roleGeneric extends simplePlugin 'roleOccupant' => 'user' ), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } diff --git a/plugins/config/class_configInLdap.inc b/plugins/config/class_configInLdap.inc index 2bf44fa25eb17c193c7b24bb5db832f3230b616f..c36be130a33032655bc33524addaeb559c05fe15 100644 --- a/plugins/config/class_configInLdap.inc +++ b/plugins/config/class_configInLdap.inc @@ -71,7 +71,7 @@ class configInLdap extends simplePlugin 'plManages' => array('configuration'), 'plPriority' => 0, - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } @@ -95,7 +95,7 @@ class configInLdap extends simplePlugin new SelectAttribute ( _('Theme'), _('Theme to be used'), 'fdTheme', TRUE, - self::get_themes(), + static::get_themes(), 'breezy' ), new SelectAttribute ( @@ -478,7 +478,7 @@ class configInLdap extends simplePlugin function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE, $attributesInfo = NULL) { global $config; - $attributesInfo = self::getAttributesInfo(); + $attributesInfo = static::getAttributesInfo(); /* Languages */ $languages = get_languages(TRUE); asort($languages); diff --git a/plugins/config/class_dashBoardConfig.inc b/plugins/config/class_dashBoardConfig.inc index 1c10b1db9f940057b7d564148dc7384ece96e559..f54d7d178dd69baaf37b1d7316cf79ae8288f752 100644 --- a/plugins/config/class_dashBoardConfig.inc +++ b/plugins/config/class_dashBoardConfig.inc @@ -31,7 +31,7 @@ class dashboardConfig extends simplePlugin 'plCategory' => array('configuration'), 'plObjectType' => array('smallConfig'), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } diff --git a/plugins/config/class_mainPluginsConfig.inc b/plugins/config/class_mainPluginsConfig.inc index 9ad54bd5bceab82afa8eddc9f3a75f0476054983..6024cbe8976c4de8e479692955a454a643aba771 100644 --- a/plugins/config/class_mainPluginsConfig.inc +++ b/plugins/config/class_mainPluginsConfig.inc @@ -31,7 +31,7 @@ class mainPluginsConfig extends simplePlugin "plCategory" => array("configuration"), "plObjectType" => array("smallConfig"), - "plProvidedAcls" => parent::generatePlProvidedAcls(self::getAttributesInfo()) + "plProvidedAcls" => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } diff --git a/plugins/config/class_recoveryConfig.inc b/plugins/config/class_recoveryConfig.inc index 6b0782e6e4162a48061e6c11b32285f951a1abf4..521ce81049f013ed8d5305f331b8bfece7e8ba1d 100644 --- a/plugins/config/class_recoveryConfig.inc +++ b/plugins/config/class_recoveryConfig.inc @@ -29,7 +29,7 @@ class recoveryConfig extends simplePlugin 'plDescription' => _('Settings for the password recovery feature'), 'plObjectType' => array('configuration'), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index fc28990c48e8009633fdcd0df135d4fa2930a4d5..44ec77df2aa0236695a8e68b717b5298d47b35e2 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -293,7 +293,7 @@ class user extends simplePlugin 'manager' => array('user','dn') ), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index cf4f8419bcddbdcac57e871288100f4c79082307..93631f464b0565ffaa0cfbee273860601d2a5061 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -41,7 +41,7 @@ class EpochDaysDateAttribute extends DateAttribute protected function ldapToDate($ldapValue) { - $date = DateTime::createFromFormat('U', $ldapValue * self::$secondsPerDay, timezone::utc()); + $date = DateTime::createFromFormat('U', $ldapValue * static::$secondsPerDay, timezone::utc()); if ($date !== FALSE) { return $date; } else { @@ -52,7 +52,7 @@ class EpochDaysDateAttribute extends DateAttribute protected function dateToLdap($dateValue) { - return floor($dateValue->format('U') / self::$secondsPerDay); + return floor($dateValue->format('U') / static::$secondsPerDay); } function getEpochDays() @@ -100,7 +100,7 @@ class posixAccount extends simplePlugin ) ), - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); } diff --git a/plugins/personal/roles/class_userRoles.inc b/plugins/personal/roles/class_userRoles.inc index 1dd2700f938b5a21818ef8b792a0e970d5131fa0..95da55faa36c59ff9c0e5df147963da3922166b4 100644 --- a/plugins/personal/roles/class_userRoles.inc +++ b/plugins/personal/roles/class_userRoles.inc @@ -36,7 +36,7 @@ class userRoles extends simplePlugin 'plObjectType' => array('user'), 'plPriority' => 5, - 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo()) + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) ); }