refactoring
This commit is contained in:
parent
802b16797a
commit
726f1e13b4
|
@ -2031,8 +2031,7 @@ abstract class baseModule {
|
||||||
* @return array messages and attributes (array('messages' => array(), 'add' => array('mail' => array('test@test.com')), 'del' => array(), 'mod' => array(), 'info' => array()))
|
* @return array messages and attributes (array('messages' => array(), 'add' => array('mail' => array('test@test.com')), 'del' => array(), 'mod' => array(), 'info' => array()))
|
||||||
*/
|
*/
|
||||||
public function checkSelfServiceOptions($fields, $attributes, $passwordChangeOnly, $readOnlyFields) {
|
public function checkSelfServiceOptions($fields, $attributes, $passwordChangeOnly, $readOnlyFields) {
|
||||||
$return = array('messages' => array(), 'add' => array(), 'del' => array(), 'mod' => array(), 'info' => array());
|
return array('messages' => array(), 'add' => array(), 'del' => array(), 'mod' => array(), 'info' => array());
|
||||||
return $return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2006 Tilo Lutz
|
Copyright (C) 2003 - 2006 Tilo Lutz
|
||||||
2005 - 2019 Roland Gruber
|
2005 - 2020 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -177,10 +177,7 @@ class account extends baseModule {
|
||||||
if (!$this->getAccountContainer()->isNewAccount && !in_array('account', $this->getAccountContainer()->attributes_orig['objectClass'])) {
|
if (!$this->getAccountContainer()->isNewAccount && !in_array('account', $this->getAccountContainer()->attributes_orig['objectClass'])) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
// Get easy attributes
|
return $this->getAccountContainer()->save_module_attributes($this->attributes, $this->orig);
|
||||||
$return = $this->getAccountContainer()->save_module_attributes($this->attributes, $this->orig);
|
|
||||||
// Return attributes
|
|
||||||
return $return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -375,8 +375,7 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I
|
||||||
$this->attributes['objectClass'] = array_delete(array("dhcpSubnet"), $this->attributes['objectClass']);
|
$this->attributes['objectClass'] = array_delete(array("dhcpSubnet"), $this->attributes['objectClass']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$return = parent::save_attributes();
|
return parent::save_attributes();
|
||||||
return $return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -835,8 +835,7 @@ if (interface_exists('\LAM\JOB\Job', false)) {
|
||||||
protected function findUsers($jobID, $options) {
|
protected function findUsers($jobID, $options) {
|
||||||
// read users
|
// read users
|
||||||
$attrs = array('radiusExpiration');
|
$attrs = array('radiusExpiration');
|
||||||
$userResults = searchLDAPByFilter('(radiusExpiration=*)', $attrs, array('user'));
|
return searchLDAPByFilter('(radiusExpiration=*)', $attrs, array('user'));
|
||||||
return $userResults;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -902,8 +901,7 @@ if (interface_exists('\LAM\JOB\Job', false)) {
|
||||||
$sysattrs = array('radiusExpiration', 'mail');
|
$sysattrs = array('radiusExpiration', 'mail');
|
||||||
$attrs = $this->getAttrWildcards($jobID, $options);
|
$attrs = $this->getAttrWildcards($jobID, $options);
|
||||||
$attrs = array_values(array_unique(array_merge($attrs, $sysattrs)));
|
$attrs = array_values(array_unique(array_merge($attrs, $sysattrs)));
|
||||||
$userResults = searchLDAPByFilter('(&(radiusExpiration=*)(mail=*))', $attrs, array('user'));
|
return searchLDAPByFilter('(&(radiusExpiration=*)(mail=*))', $attrs, array('user'));
|
||||||
return $userResults;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3718,8 +3718,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
$imageManipulator->thumbnail($maxWidth, $maxHeight);
|
$imageManipulator->thumbnail($maxWidth, $maxHeight);
|
||||||
}
|
}
|
||||||
$imageManipulator->convertToJpeg();
|
$imageManipulator->convertToJpeg();
|
||||||
$data = $imageManipulator->getImageData();
|
return $imageManipulator->getImageData();
|
||||||
return $data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3715,8 +3715,7 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
*/
|
*/
|
||||||
private function cleanSuggestionPart($part) {
|
private function cleanSuggestionPart($part) {
|
||||||
$result = str_replace(array_keys($this->umlautReplacements), array_values($this->umlautReplacements), strtolower($part));
|
$result = str_replace(array_keys($this->umlautReplacements), array_values($this->umlautReplacements), strtolower($part));
|
||||||
$result = str_replace(array(' ', '_', '-'), array('', '', ''), $result);
|
return str_replace(array(' ', '_', '-'), array('', '', ''), $result);
|
||||||
return $result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -316,9 +316,7 @@ class sambaMungedDial
|
||||||
$this->ctx[$value]= 0;
|
$this->ctx[$value]= 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$result= base64_encode($this->encode_munged($this->ctx));
|
return base64_encode($this->encode_munged($this->ctx));
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns array of flags, which can be set on-demand with activated java-script */
|
/** Returns array of flags, which can be set on-demand with activated java-script */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2006 Tilo Lutz
|
Copyright (C) 2003 - 2006 Tilo Lutz
|
||||||
Copyright (C) 2007 - 2019 Roland Gruber
|
Copyright (C) 2007 - 2020 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -887,8 +887,7 @@ if (interface_exists('\LAM\JOB\Job', false)) {
|
||||||
$sysattrs = array('mail', 'shadowLastChange', 'shadowWarning', 'shadowMax', 'userPassword');
|
$sysattrs = array('mail', 'shadowLastChange', 'shadowWarning', 'shadowMax', 'userPassword');
|
||||||
$attrs = $this->getAttrWildcards($jobID, $options);
|
$attrs = $this->getAttrWildcards($jobID, $options);
|
||||||
$attrs = array_values(array_unique(array_merge($attrs, $sysattrs)));
|
$attrs = array_values(array_unique(array_merge($attrs, $sysattrs)));
|
||||||
$userResults = searchLDAPByFilter('(&(shadowLastChange=*)(shadowMax=*)(mail=*))', $attrs, array('user'));
|
return searchLDAPByFilter('(&(shadowLastChange=*)(shadowMax=*)(mail=*))', $attrs, array('user'));
|
||||||
return $userResults;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1091,8 +1090,7 @@ if (interface_exists('\LAM\JOB\Job', false)) {
|
||||||
protected function findUsers($jobID, $options) {
|
protected function findUsers($jobID, $options) {
|
||||||
// read users
|
// read users
|
||||||
$attrs = array('shadowExpire');
|
$attrs = array('shadowExpire');
|
||||||
$userResults = searchLDAPByFilter('(shadowExpire=*)', $attrs, array('user'));
|
return searchLDAPByFilter('(shadowExpire=*)', $attrs, array('user'));
|
||||||
return $userResults;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -312,7 +312,7 @@ class lamDHCPList extends lamList {
|
||||||
if (empty($pool['dhcprange'])) {
|
if (empty($pool['dhcprange'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
foreach($pool['dhcprange'] AS $id => $value) {
|
foreach($pool['dhcprange'] AS $value) {
|
||||||
if (!empty($value) && !is_numeric($value)) {
|
if (!empty($value) && !is_numeric($value)) {
|
||||||
$ex = explode(" ", $value);
|
$ex = explode(" ", $value);
|
||||||
$row = new htmlTableRow(
|
$row = new htmlTableRow(
|
||||||
|
|
Loading…
Reference in New Issue