Commit 90b306a5 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes: #2595 The code should follow code guidelines

parent 2bfb3d16
......@@ -52,7 +52,7 @@ class userinfo
/* get acl's an put them into the userinfo object
attr subtreeACL (userdn:components, userdn:component1#sub1#sub2,component2,...) */
function userinfo(&$config, $userdn)
function __construct(&$config, $userdn)
{
$this->config = &$config;
$ldap = $this->config->get_ldap_link();
......@@ -174,7 +174,7 @@ class userinfo
$interresting = FALSE;
} else {
/* Inspect members... */
foreach ($type['members'] as $grp => $grpdsc) {
foreach (array_keys($type['members']) as $grp) {
/* Some group inside the members that is relevant for us? */
if (in_array_ics(@LDAP::convert(preg_replace('/^G:/', '', $grp)), $this->groups)) {
$interresting = TRUE;
......@@ -621,7 +621,6 @@ class userinfo
$module = array($module);
}
global $plist;
$res = array();
foreach ($module as $mod) {
if (isset($ACL_CACHE['MODULE_DEPARTMENTS'][$mod])) {
......@@ -904,9 +903,8 @@ class userinfo
$$attr = (isset($attrs[$attr][0])? $attrs[$attr][0] : NULL);
}
// Check if the account has reached its kick off limitations.
// ---------------------------------------------------------
// ----------------------------------------------------------
// Once the accout reaches the kick off limit it has expired.
if ($sambaKickoffTime !== NULL) {
if (time() >= $sambaKickoffTime) {
......@@ -914,7 +912,6 @@ class userinfo
}
}
// Check if the account has expired.
// ---------------------------------
// An account is locked/expired once its expiration date has reached (shadowExpire).
......
......@@ -277,6 +277,11 @@ class acl_createedit extends acl
$this->loadAclEntry($acl);
}
function compute_dn()
{
return 'cn='.$this->cn.",".get_ou('aclRoleRDN').$this->base;
}
function execute()
{
/* Call parent execute */
......
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2003 Cajus Pollmeier
......@@ -22,8 +21,7 @@
class acltab extends tabs
{
function acltab($config, $data, $dn, $cat = "", $copied_object = NULL)
function __construct($config, $data, $dn, $cat = "", $copied_object = NULL)
{
$data = array(array("CLASS" => "acl" , "NAME" => _("ACL")));
parent::__construct($config, $data, $dn, "", $copied_object);
......
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2003 Cajus Pollmeier
......@@ -20,11 +19,11 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
class aclroletab extends tabs
class aclroletab extends simpleTabs_noSpecial
{
function execute()
{
$display = tabs::execute();
$display = parent::execute();
if ($this->read_only) {
$display .= '<p class="plugbottom">'."\n";
$display .= ' <input type="submit" name="edit_cancel" value="'.msgPool::cancelButton().'"/>'."\n";
......
This diff is collapsed.
This diff is collapsed.
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