added $autoAddObjectClasses
This commit is contained in:
parent
ad0c0732b3
commit
2ae94931f5
|
@ -1,40 +1,73 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html><head><title>Upgrade nores</title>
|
<html><head>
|
||||||
|
<title>Upgrade notes</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="style/layout.css"></head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||||
|
</head><body>
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<h1>Upgrade notes</h1></div>
|
<h1>Upgrade notes</h1></div>
|
||||||
|
|
||||||
|
|
||||||
<h2>2.1.0 -> 2.2.0</h2>
|
<h2>2.1.0 -> 2.2.0</h2>
|
||||||
|
|
||||||
Account lists now support to define tools. These are displayed as linked images like the edit and delete links in the list.<br>
|
Account lists now support to define tools. These are displayed as linked images like the edit and delete links in the list.<br>
|
||||||
|
|
||||||
Overwrite <span style="font-weight: bold;">lamList::getAdditionalTools()</span> to use this feature.<br>
|
Overwrite <span style="font-weight: bold;">lamList::getAdditionalTools()</span> to use this feature.<br>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
The definition of account list options changed. The function <span style="font-weight: bold;">lamList::getAdditionalTools()</span> is no longer available. Use these functions instead: <span style="font-weight: bold;">lamList::listGetAllConfigOptions()</span> and <span style="font-weight: bold;">lamList::listConfigurationChanged()</span>.<br>
|
The definition of account list options changed. The function <span style="font-weight: bold;">lamList::getAdditionalTools()</span> is no longer available. Use these functions instead: <span style="font-weight: bold;">lamList::listGetAllConfigOptions()</span> and <span style="font-weight: bold;">lamList::listConfigurationChanged()</span>.<br>
|
||||||
|
|
||||||
All options are now saved in cookies for one year.<br>
|
All options are now saved in cookies for one year.<br>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
The <span style="font-weight: bold;">baseModule</span> class has a new protected option: <span style="font-weight: bold;">$autoAddObjectClasses </span>You can set it to false if you do not want that your module's object classes are added when creating or loading an account.<br>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
<h2>2.0.0 -> 2.1.0</h2>
|
<h2>2.0.0 -> 2.1.0</h2>
|
||||||
|
|
||||||
<span style="font-weight: bold;">Style changes:</span><br>
|
<span style="font-weight: bold;">Style changes:</span><br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li>"fieldset.<type>edit fieldset" and "fieldset.<type>edit fieldset fieldset" were removed.</li>
|
<li>"fieldset.<type>edit fieldset" and "fieldset.<type>edit fieldset fieldset" were removed.</li>
|
||||||
<li>"table.<type>list input" changed to "table.<type>list input,select"</li>
|
<li>"table.<type>list input" changed to "table.<type>list input,select"</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<span style="font-weight: bold;">baseModule:</span><br>
|
<span style="font-weight: bold;">baseModule:</span><br>
|
||||||
|
|
||||||
The class variable<span style="font-style: italic;"> $base</span> is no longer visible in child classes. Please use <span style="font-style: italic;">$this->getAccountContainer()</span> to access the accountContainer object.<br>
|
The class variable<span style="font-style: italic;"> $base</span> is no longer visible in child classes. Please use <span style="font-style: italic;">$this->getAccountContainer()</span> to access the accountContainer object.<br>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
Several other class variables in accountContainer etc. are now private. Use the new access methods.<br>
|
Several other class variables in accountContainer etc. are now private. Use the new access methods.<br>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h2>1.3.0 -> 2.0.0</h2>
|
<h2>1.3.0 -> 2.0.0</h2>
|
||||||
|
|
||||||
LAM is now PHP5 only. Several variables are now private and need to be accessed via functions.<br>
|
LAM is now PHP5 only. Several variables are now private and need to be accessed via functions.<br>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h2>1.2.0 -> 1.3.0</h2>
|
<h2>1.2.0 -> 1.3.0</h2>
|
||||||
|
|
||||||
<span style="font-weight: bold;">New lamList function:</span><br>
|
<span style="font-weight: bold;">New lamList function:</span><br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li><span style="font-weight: bold;">listPrintTableCellContent():</span>
|
<li><span style="font-weight: bold;">listPrintTableCellContent():</span>
|
||||||
This function allows you to control how the LDAP attributes are
|
This function allows you to control how the LDAP attributes are
|
||||||
displayed in the table. This can be used to display links or binary
|
displayed in the table. This can be used to display links or binary
|
||||||
|
@ -44,47 +77,71 @@ If you want to display additional conrols for a list please use this
|
||||||
function. The controls will be placed under the account table.<br>
|
function. The controls will be placed under the account table.<br>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
No more lamdaemon commands via delete_attributes() and save_attributes() in account modules.<br>
|
No more lamdaemon commands via delete_attributes() and save_attributes() in account modules.<br>
|
||||||
|
|
||||||
Please use these new functions to call lamdaemon directly:<br>
|
Please use these new functions to call lamdaemon directly:<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li>preModifyActions()</li>
|
<li>preModifyActions()</li>
|
||||||
<li>postModifyActions()</li>
|
<li>postModifyActions()</li>
|
||||||
<li>preDeleteActions()</li>
|
<li>preDeleteActions()</li>
|
||||||
<li>postDeleteActions()</li>
|
<li>postDeleteActions()</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h2>1.1.x -> 1.2.0</h2>
|
<h2>1.1.x -> 1.2.0</h2>
|
||||||
|
|
||||||
<span style="font-weight: bold;">API changes:</span><br>
|
<span style="font-weight: bold;">API changes:</span><br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li>removed get_configDescription() from module interface</li>
|
<li>removed get_configDescription() from module interface</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h2>1.0.4 -> 1.1.0</h2>
|
<h2>1.0.4 -> 1.1.0</h2>
|
||||||
|
|
||||||
<span style="font-weight: bold;">API changes:</span><br>
|
<span style="font-weight: bold;">API changes:</span><br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li>removed $post parameters from module functions (delete_attributes(), process_...(), display_html_...()). Use $_POST instead.</li>
|
<li>removed $post parameters from module functions (delete_attributes(), process_...(), display_html_...()). Use $_POST instead.</li>
|
||||||
<li>process_...()
|
<li>process_...()
|
||||||
functions: returned messages are no longer grouped (e.g. return:
|
functions: returned messages are no longer grouped (e.g. return:
|
||||||
array(array('INFO', 'headline', 'text'), array('INFO', 'headline2',
|
array(array('INFO', 'headline', 'text'), array('INFO', 'headline2',
|
||||||
'text2')))</li>
|
'text2')))</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h2>1.0.0 -> 1.0.2</h2>
|
<h2>1.0.0 -> 1.0.2</h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<span style="font-weight: bold;">New module functions:</span><br>
|
<span style="font-weight: bold;">New module functions:</span><br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li>getRequiredExtensions: Allows to define required PHP extensions</li>
|
<li>getRequiredExtensions: Allows to define required PHP extensions</li>
|
||||||
<li>getManagedObjectClasses: Definition of managed object classes for this module</li>
|
<li>getManagedObjectClasses: Definition of managed object classes for this module</li>
|
||||||
<li>getLDAPAliases: list of LDAP alias names which are replaced by LAM</li>
|
<li>getLDAPAliases: list of LDAP alias names which are replaced by LAM</li>
|
||||||
<li>getManagedAttributes: list of LDAP attributes which are managed by this module</li>
|
<li>getManagedAttributes: list of LDAP attributes which are managed by this module</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
The LDAP attributes are no longer loaded by reading the LDAP schema. If
|
The LDAP attributes are no longer loaded by reading the LDAP schema. If
|
||||||
your module does not implement the load_attributes() function then you
|
your module does not implement the load_attributes() function then you
|
||||||
have to use getManagedAttributes() or the meta data to specify them.<br>
|
have to use getManagedAttributes() or the meta data to specify them.<br>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
The class variable "triggered_messages" in baseModule was removed.<br>
|
The class variable "triggered_messages" in baseModule was removed.<br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
</body></html>
|
</body></html>
|
|
@ -63,6 +63,9 @@ abstract class baseModule {
|
||||||
/** contains all error messages of a module */
|
/** contains all error messages of a module */
|
||||||
protected $messages;
|
protected $messages;
|
||||||
|
|
||||||
|
/** if true, managed object classes are added when an account is created or loaded (default: true) */
|
||||||
|
protected $autoAddObjectClasses;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new base module class
|
* Creates a new base module class
|
||||||
*
|
*
|
||||||
|
@ -72,6 +75,7 @@ abstract class baseModule {
|
||||||
$this->scope = $scope;
|
$this->scope = $scope;
|
||||||
$this->load_Messages();
|
$this->load_Messages();
|
||||||
$this->meta = $this->get_metaData();
|
$this->meta = $this->get_metaData();
|
||||||
|
$this->autoAddObjectClasses = true;
|
||||||
// load configuration
|
// load configuration
|
||||||
if (isset($_SESSION['config'])) $this->moduleSettings = $_SESSION['config']->get_moduleSettings();
|
if (isset($_SESSION['config'])) $this->moduleSettings = $_SESSION['config']->get_moduleSettings();
|
||||||
if (isset($_SESSION['selfServiceProfile'])) $this->selfServiceSettings = $_SESSION['selfServiceProfile']->moduleSettings;
|
if (isset($_SESSION['selfServiceProfile'])) $this->selfServiceSettings = $_SESSION['selfServiceProfile']->moduleSettings;
|
||||||
|
@ -95,9 +99,13 @@ abstract class baseModule {
|
||||||
// add object classes if needed
|
// add object classes if needed
|
||||||
$this->attributes['objectClass'] = array();
|
$this->attributes['objectClass'] = array();
|
||||||
$this->orig['objectClass'] = array();
|
$this->orig['objectClass'] = array();
|
||||||
$objectClasses = $this->getManagedObjectClasses();
|
if ($this->autoAddObjectClasses === true) {
|
||||||
for ($i = 0; $i < sizeof($objectClasses); $i++) {
|
$objectClasses = $this->getManagedObjectClasses();
|
||||||
if (!in_array($objectClasses[$i], $this->attributes['objectClass'])) $this->attributes['objectClass'][] = $objectClasses[$i];
|
for ($i = 0; $i < sizeof($objectClasses); $i++) {
|
||||||
|
if (!in_array($objectClasses[$i], $this->attributes['objectClass'])) {
|
||||||
|
$this->attributes['objectClass'][] = $objectClasses[$i];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,9 +128,13 @@ abstract class baseModule {
|
||||||
$this->orig['objectClass'] = array();
|
$this->orig['objectClass'] = array();
|
||||||
}
|
}
|
||||||
// add object classes if needed
|
// add object classes if needed
|
||||||
$objectClasses = $this->getManagedObjectClasses();
|
if ($this->autoAddObjectClasses === true) {
|
||||||
for ($i = 0; $i < sizeof($objectClasses); $i++) {
|
$objectClasses = $this->getManagedObjectClasses();
|
||||||
if (!in_array($objectClasses[$i], $this->attributes['objectClass'])) $this->attributes['objectClass'][] = $objectClasses[$i];
|
for ($i = 0; $i < sizeof($objectClasses); $i++) {
|
||||||
|
if (!in_array($objectClasses[$i], $this->attributes['objectClass'])) {
|
||||||
|
$this->attributes['objectClass'][] = $objectClasses[$i];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// load attributes
|
// load attributes
|
||||||
$attributeNames = $this->getManagedAttributes();
|
$attributeNames = $this->getManagedAttributes();
|
||||||
|
|
Loading…
Reference in New Issue