removed $post parameter

This commit is contained in:
Roland Gruber 2006-08-14 17:29:45 +00:00
parent 44701eca3c
commit ed090ae9bf
5 changed files with 84 additions and 82 deletions

View File

@ -1,3 +1,9 @@
??? 1.0.5
Developers:
- API changes: removed $post parameters from module functions (delete_attributes(),
process_...(), display_html_...()). Use $_POST instead.
10.08.2006 1.0.4 10.08.2006 1.0.4
- added Russian translation - added Russian translation
- Samba 3: added policies for domain objects - Samba 3: added policies for domain objects
@ -84,7 +90,7 @@
- fixed bugs: - fixed bugs:
-> creation of home directories did not work -> creation of home directories did not work
-> allow spaces in profile names (1333058) -> allow spaces in profile names (1333058)
-> fixed problem with magic_quotes_gpc in profile editor (1333069) -> fixed problem with magic_quotes_gpc in profile editor (1333069)
-> inetOrgPerson: deletion of postal address and fax number now works -> inetOrgPerson: deletion of postal address and fax number now works

View File

@ -53,7 +53,7 @@ class baseModule {
/** contains all ldap attributes which should be written */ /** contains all ldap attributes which should be written */
var $attributes; var $attributes;
/** contains all ldap attributes which are loaded from ldap */ /** contains all ldap attributes which are loaded from ldap */
var $orig; var $orig;
@ -323,7 +323,7 @@ class baseModule {
} }
} }
} }
/** /**
* Returns a list of elements for the configuration. * Returns a list of elements for the configuration.
* *
@ -379,7 +379,7 @@ class baseModule {
if ($options[$identifiers[$i]][0] == '') continue; if ($options[$identifiers[$i]][0] == '') continue;
if (! get_preg($options[$identifiers[$i]][0], $this->meta['config_checks'][$scopes[$s]][$identifiers[$i]]['regex'])) { if (! get_preg($options[$identifiers[$i]][0], $this->meta['config_checks'][$scopes[$s]][$identifiers[$i]]['regex'])) {
$messages[] = $this->meta['config_checks'][$scopes[$s]][$identifiers[$i]]['error_message']; $messages[] = $this->meta['config_checks'][$scopes[$s]][$identifiers[$i]]['error_message'];
} }
break; break;
// check by regular expression (case insensitive) // check by regular expression (case insensitive)
case "regex_i": case "regex_i":
@ -387,7 +387,7 @@ class baseModule {
if ($options[$identifiers[$i]][0] == '') continue; if ($options[$identifiers[$i]][0] == '') continue;
if (! eregi($this->meta['config_checks'][$scopes[$s]][$identifiers[$i]]['regex'], $options[$identifiers[$i]][0])) { if (! eregi($this->meta['config_checks'][$scopes[$s]][$identifiers[$i]]['regex'], $options[$identifiers[$i]][0])) {
$messages[] = $this->meta['config_checks'][$scopes[$s]][$identifiers[$i]]['error_message']; $messages[] = $this->meta['config_checks'][$scopes[$s]][$identifiers[$i]]['error_message'];
} }
break; break;
// check by regular expression (case sensitive) // check by regular expression (case sensitive)
case "regex": case "regex":
@ -435,27 +435,27 @@ class baseModule {
} }
return $messages; return $messages;
} }
/** /**
* Returns an array with all fields available for this account type on the PDF * Returns an array with all fields available for this account type on the PDF
* output. This method may be overwritten by subclasses or it may be used * output. This method may be overwritten by subclasses or it may be used
* by using entries in the $this->meta['PDF_fields'] array of the specific sub- * by using entries in the $this->meta['PDF_fields'] array of the specific sub-
* class. * class.
* *
* @param string $scope account type * @param string $scope account type
* @return array list of available fields for PDF output * @return array list of available fields for PDF output
*/ */
function get_pdfFields() { function get_pdfFields() {
return ((isset($this->meta['PDF_fields'])) ? $this->meta['PDF_fields'] : array()); return ((isset($this->meta['PDF_fields'])) ? $this->meta['PDF_fields'] : array());
} }
/** /**
* Returns a hastable with all entries that may be printed out in the PDF. The * Returns a hastable with all entries that may be printed out in the PDF. The
* syntax of the hashtable is specified by the module specification and the * syntax of the hashtable is specified by the module specification and the
* corresponding DTD. This method must be overwritten in case that there * corresponding DTD. This method must be overwritten in case that there
* are non static things to be returned. The $this->meta['PDF_entries'] array * are non static things to be returned. The $this->meta['PDF_entries'] array
* may be used when there is only static content. * may be used when there is only static content.
* *
* @param string $scope account type * @param string $scope account type
* @return array hastable of entries for the PDF. Each entry is an array where * @return array hastable of entries for the PDF. Each entry is an array where
* each entry is treated as a new line in the PDF. * each entry is treated as a new line in the PDF.
@ -505,14 +505,14 @@ class baseModule {
// must be implemented in sub modules // must be implemented in sub modules
return array(); return array();
} }
/** /**
* This function return the help entry array for a specific help id. Normally this->meta can be used. * This function return the help entry array for a specific help id. Normally this->meta can be used.
* *
* @param string $id The id string for the help entry needed. * @param string $id The id string for the help entry needed.
* @param string $scope The scope for which the help entry should be retrieved. May be empty when * @param string $scope The scope for which the help entry should be retrieved. May be empty when
* there is now difference of the help entry depending on the actual scope. * there is now difference of the help entry depending on the actual scope.
* *
* @return array The desired help entry. * @return array The desired help entry.
*/ */
function get_help($id) { function get_help($id) {
@ -545,7 +545,7 @@ class baseModule {
function module_complete() { function module_complete() {
return true; return true;
} }
/** /**
* Controls if the module button the account page is visible and activated. * Controls if the module button the account page is visible and activated.
* *
@ -595,23 +595,21 @@ class baseModule {
/** /**
* Dummy function for modules which use no special options on account deletion. * Dummy function for modules which use no special options on account deletion.
* *
* @param $post The HTTP POST variables of the delete page
* @return List of LDAP operations, same as for save_attributes() * @return List of LDAP operations, same as for save_attributes()
*/ */
function delete_attributes($post) { function delete_attributes() {
return 0; return 0;
} }
/** /**
* Dummy function for modules which do not print extra HTML code on account deletion. * Dummy function for modules which do not print extra HTML code on account deletion.
* *
* @param $post HTTP POST values
* @return meta HTML code * @return meta HTML code
*/ */
function display_html_delete(&$post) { function display_html_delete() {
return 0; return 0;
} }
/** /**
* Returns a list of managed object classes for this module. * Returns a list of managed object classes for this module.
* This is used to fix incorrect spelled object class names. * This is used to fix incorrect spelled object class names.
@ -622,7 +620,7 @@ class baseModule {
if (isset($this->meta['objectClasses']) && is_array($this->meta['objectClasses'])) return $this->meta['objectClasses']; if (isset($this->meta['objectClasses']) && is_array($this->meta['objectClasses'])) return $this->meta['objectClasses'];
else return array(); else return array();
} }
/** /**
* Returns a list of aliases for LDAP attributes. * Returns a list of aliases for LDAP attributes.
* All alias attributes will be renamed to the given attribute names. * All alias attributes will be renamed to the given attribute names.
@ -633,7 +631,7 @@ class baseModule {
if (isset($this->meta['LDAPaliases']) && is_array($this->meta['LDAPaliases'])) return $this->meta['LDAPaliases']; if (isset($this->meta['LDAPaliases']) && is_array($this->meta['LDAPaliases'])) return $this->meta['LDAPaliases'];
else return array(); else return array();
} }
/** /**
* Returns a list of LDAP attributes which are managed by this module. * Returns a list of LDAP attributes which are managed by this module.
* All attribute names will be renamed to match the given spelling. * All attribute names will be renamed to match the given spelling.
@ -644,7 +642,7 @@ class baseModule {
if (isset($this->meta['attributes']) && is_array($this->meta['attributes'])) return $this->meta['attributes']; if (isset($this->meta['attributes']) && is_array($this->meta['attributes'])) return $this->meta['attributes'];
else return array(); else return array();
} }
/** /**
* Returns a list of required PHP extensions. * Returns a list of required PHP extensions.
* *
@ -652,9 +650,9 @@ class baseModule {
*/ */
function getRequiredExtensions() { function getRequiredExtensions() {
if (isset($this->meta['extensions']) && is_array($this->meta['extensions'])) return $this->meta['extensions']; if (isset($this->meta['extensions']) && is_array($this->meta['extensions'])) return $this->meta['extensions'];
else return array(); else return array();
} }
/** /**
* Returns a list of possible search attributes for the self service. * Returns a list of possible search attributes for the self service.
* *
@ -662,7 +660,7 @@ class baseModule {
*/ */
function getSelfServiceSearchAttributes() { function getSelfServiceSearchAttributes() {
if (isset($this->meta['selfServiceSearchAttributes']) && is_array($this->meta['selfServiceSearchAttributes'])) return $this->meta['selfServiceSearchAttributes']; if (isset($this->meta['selfServiceSearchAttributes']) && is_array($this->meta['selfServiceSearchAttributes'])) return $this->meta['selfServiceSearchAttributes'];
else return array(); else return array();
} }
/** /**
@ -673,9 +671,9 @@ class baseModule {
*/ */
function getSelfServiceFields() { function getSelfServiceFields() {
if (isset($this->meta['selfServiceFieldSettings']) && is_array($this->meta['selfServiceFieldSettings'])) return $this->meta['selfServiceFieldSettings']; if (isset($this->meta['selfServiceFieldSettings']) && is_array($this->meta['selfServiceFieldSettings'])) return $this->meta['selfServiceFieldSettings'];
else return array(); else return array();
} }
/** /**
* Returns the meta HTML code for each input field. * Returns the meta HTML code for each input field.
* format: array(<field1> => array(<META HTML>), ...) * format: array(<field1> => array(<META HTML>), ...)

View File

@ -24,7 +24,7 @@ $Id$
/** /**
* Interface between modules and other parts of LAM. * Interface between modules and other parts of LAM.
* *
* @package modules * @package modules
* @author Tilo Lutz * @author Tilo Lutz
* @author Michael Duergner * @author Michael Duergner
@ -43,7 +43,7 @@ include_once("ldap.inc");
include_once("lamdaemon.inc"); include_once("lamdaemon.inc");
/** security functions */ /** security functions */
include_once("security.inc"); include_once("security.inc");
/** /**
* This includes all module files. * This includes all module files.
*/ */
@ -676,7 +676,7 @@ function parseHtml($module, $input, $values, $restricted, &$tabindex, &$tabindex
foreach ($options as $option) { foreach ($options as $option) {
if (isset($input[$i][$j]['descriptiveOptions']) && ($input[$i][$j]['descriptiveOptions'] === true)) { if (isset($input[$i][$j]['descriptiveOptions']) && ($input[$i][$j]['descriptiveOptions'] === true)) {
if (in_array($option[0], $input[$i][$j]['options_selected'])) echo "<option value=\"" . $option[0] . "\" selected>" . $option[1] . "</option>\n"; if (in_array($option[0], $input[$i][$j]['options_selected'])) echo "<option value=\"" . $option[0] . "\" selected>" . $option[1] . "</option>\n";
else echo "<option value=\"" . $option[0] . "\">" . $option[1] . "</option>\n"; else echo "<option value=\"" . $option[0] . "\">" . $option[1] . "</option>\n";
} }
elseif ($option!='') { elseif ($option!='') {
if (in_array($option, $input[$i][$j]['options_selected'])) echo "<option selected>" . $option . "</option>\n"; if (in_array($option, $input[$i][$j]['options_selected'])) echo "<option selected>" . $option . "</option>\n";
@ -744,7 +744,7 @@ class accountContainer {
* types are: user, group, host * types are: user, group, host
*/ */
// Check input variable // Check input variable
if (!is_string($type)) trigger_error('Argument of accountContainer must be string.', E_USER_ERROR); if (!is_string($type)) trigger_error('Argument of accountContainer must be string.', E_USER_ERROR);
if (!is_string($base)) trigger_error('Argument of accountContainer must be string.', E_USER_ERROR); if (!is_string($base)) trigger_error('Argument of accountContainer must be string.', E_USER_ERROR);
$this->type = $type; $this->type = $type;
@ -761,44 +761,44 @@ class accountContainer {
* Syntax is attribute => array ( objectClass => MUST or MAY, ...) * Syntax is attribute => array ( objectClass => MUST or MAY, ...)
*/ */
var $attributes; var $attributes;
/** /**
* This variale stores the account type. * This variale stores the account type.
* Currently "user", "group" and "host" are supported. * Currently "user", "group" and "host" are supported.
*/ */
var $type; var $type;
/** This is an array with all module objects */ /** This is an array with all module objects */
var $module; var $module;
/** DN suffix of the account */ /** DN suffix of the account */
var $dn; var $dn;
/** DN suffix of account when it was loaded */ /** DN suffix of account when it was loaded */
var $dn_orig; var $dn_orig;
/** RDN attribute of this account */ /** RDN attribute of this account */
var $rdn; var $rdn;
/** original LDAP attributes when account was loaded from LDAP */ /** original LDAP attributes when account was loaded from LDAP */
var $attributes_orig; var $attributes_orig;
/** Module order */ /** Module order */
var $order; var $order;
/** Name of accountContainer variable in session */ /** Name of accountContainer variable in session */
var $base; var $base;
/** This variable stores the name of the currently displayed page */ /** This variable stores the name of the currently displayed page */
var $current_page; var $current_page;
/** This variable is set to the pagename of a subpage if it should be displayed */ /** This variable is set to the pagename of a subpage if it should be displayed */
var $subpage; var $subpage;
/** True if this is a newly created account */ /** True if this is a newly created account */
var $isNewAccount; var $isNewAccount;
/** /**
* Returns the accout type of this object (e.g. user, group, host). * Returns the accout type of this object (e.g. user, group, host).
* *
@ -807,16 +807,14 @@ class accountContainer {
function get_type() { function get_type() {
return $this->type; return $this->type;
} }
/** /**
* This function is called when the user clicks on any button on the account pages. * This function is called when the user clicks on any button on the account pages.
* It prints the HTML code of each account page. * It prints the HTML code of each account page.
*
* @param array $post HTTP POST variables
*/ */
function continue_main($post) { function continue_main() {
if ($this->subpage=='') $this->subpage='attributes'; if ($this->subpage=='') $this->subpage='attributes';
if (isset($post['form_main_reset'])) { if (isset($_POST['form_main_reset'])) {
$this->load_account($this->dn_orig); $this->load_account($this->dn_orig);
} }
else { else {
@ -824,13 +822,13 @@ class accountContainer {
if ($this->subpage=='attributes') { if ($this->subpage=='attributes') {
$result = 0; $result = 0;
// change dn // change dn
if (isset($post['suffix']) && ($post['suffix'] != '')) $this->dn = $post['suffix']; if (isset($_POST['suffix']) && ($_POST['suffix'] != '')) $this->dn = $_POST['suffix'];
// change RDN // change RDN
if (isset($post['rdn'])) $this->rdn = $post['rdn']; if (isset($_POST['rdn'])) $this->rdn = $_POST['rdn'];
// load profile // load profile
if (isset($post['selectLoadProfile']) && isset($post['loadProfile'])) { if (isset($_POST['selectLoadProfile']) && isset($_POST['loadProfile'])) {
$profile = loadAccountProfile($post['selectLoadProfile'], $this->type); $profile = loadAccountProfile($_POST['selectLoadProfile'], $this->type);
// pass profile to each module // pass profile to each module
$modules = array_keys($this->module); $modules = array_keys($this->module);
foreach ($modules as $module) $this->module[$module]->load_profile($profile); foreach ($modules as $module) $this->module[$module]->load_profile($profile);
@ -845,7 +843,7 @@ class accountContainer {
$result = 0; $result = 0;
} }
// save account // save account
if (isset($post['create'])) { if (isset($_POST['create'])) {
$errors = $this->save_account(); $errors = $this->save_account();
if (is_array($errors)) { if (is_array($errors)) {
$result = array($errors); $result = array($errors);
@ -855,26 +853,26 @@ class accountContainer {
} }
} }
if ($this->subpage=='finish') { if ($this->subpage=='finish') {
if (isset($post['createagain'])) { if (isset($_POST['createagain'])) {
// open fresh account page // open fresh account page
unset($_SESSION[$this->base]); unset($_SESSION[$this->base]);
metaRefresh("edit.php?type=" . $this->type); metaRefresh("edit.php?type=" . $this->type);
exit(); exit();
} }
if (isset($post['backmain'])) { if (isset($_POST['backmain'])) {
// Return to account list // Return to account list
unset($_SESSION[$this->base]); unset($_SESSION[$this->base]);
metaRefresh("../lists/list.php?type=" . $this->type); metaRefresh("../lists/list.php?type=" . $this->type);
exit; exit;
} }
if (isset($post['outputpdf'])) { if (isset($_POST['outputpdf'])) {
// Create / display PDf-file // Create / display PDf-file
createModulePDF(array($_SESSION[$this->base]), $post['pdfStructure']); createModulePDF(array($_SESSION[$this->base]), $_POST['pdfStructure']);
exit; exit;
} }
} }
} }
else $result = call_user_func(array(&$this->module[$this->order[$this->current_page]], 'process_'.$this->subpage), $post); else $result = call_user_func(array(&$this->module[$this->order[$this->current_page]], 'process_'.$this->subpage));
} }
// change to next page // change to next page
$errorsOccured = false; $errorsOccured = false;
@ -882,7 +880,7 @@ class accountContainer {
$errorKeys = array_keys($result); $errorKeys = array_keys($result);
for ($i = 0; $i < sizeof($errorKeys); $i++) { for ($i = 0; $i < sizeof($errorKeys); $i++) {
for ($m = 0; $m < sizeof($result[$errorKeys[$i]]); $m++) { for ($m = 0; $m < sizeof($result[$errorKeys[$i]]); $m++) {
if (($result[$errorKeys[$i]][$m][0] == 'ERROR') || ($result[$errorKeys[$i]][$m][0] == 'WARN')) { if ($result[$errorKeys[$i]][$m][0] == 'ERROR') {
$errorsOccured = true; $errorsOccured = true;
break; break;
} }
@ -891,7 +889,7 @@ class accountContainer {
} }
if (!$errorsOccured) { if (!$errorsOccured) {
// go to subpage of current module // go to subpage of current module
$postKeys = array_keys($post); $postKeys = array_keys($_POST);
for ($p = 0; $p < sizeof($postKeys); $p++) { for ($p = 0; $p < sizeof($postKeys); $p++) {
if (is_string($postKeys[$p]) && (strpos($postKeys[$p], 'form_subpage_' . $this->order[$this->current_page]) === 0)) { if (is_string($postKeys[$p]) && (strpos($postKeys[$p], 'form_subpage_' . $this->order[$this->current_page]) === 0)) {
$temp = substr($postKeys[$p], strlen($this->order[$this->current_page]) + 14); $temp = substr($postKeys[$p], strlen($this->order[$this->current_page]) + 14);
@ -902,13 +900,13 @@ class accountContainer {
} }
} }
// change module page if requested // change module page if requested
if (isset($post['form_main_main'])) { if (isset($_POST['form_main_main'])) {
$this->current_page = 0; $this->current_page = 0;
$this->subpage='attributes'; $this->subpage='attributes';
} }
else { else {
for ($i=1; $i<count($this->order); $i++ ) { for ($i=1; $i<count($this->order); $i++ ) {
if (isset($post['form_main_'.$this->order[$i]])) { if (isset($_POST['form_main_'.$this->order[$i]])) {
if ($this->module[$this->order[$i]]->module_ready()) { if ($this->module[$this->order[$i]]->module_ready()) {
$this->current_page = $i; $this->current_page = $i;
$this->subpage='attributes'; $this->subpage='attributes';
@ -954,7 +952,7 @@ class accountContainer {
if (!$this->module[$module]->module_complete()) { if (!$this->module[$module]->module_complete()) {
$disabled = true; $disabled = true;
$incompleteModules[] = $this->module[$module]->get_alias(); $incompleteModules[] = $this->module[$module]->get_alias();
} }
} }
if (sizeof($incompleteModules) > 0) { if (sizeof($incompleteModules) > 0) {
StatusMessage('INFO', _('Some required information is missing'), StatusMessage('INFO', _('Some required information is missing'),
@ -964,7 +962,7 @@ class accountContainer {
} }
// Create left module-menu // Create left module-menu
echo "<table border=0 width=\"100%\">\n<tr valign=\"top\"><td width=\"15%\">"; echo "<table border=0 width=\"100%\">\n<tr valign=\"top\"><td width=\"15%\">";
echo "<fieldset class=\"".$this->type."edit\"><legend><b>"; echo "<fieldset class=\"".$this->type."edit\"><legend><b>";
echo _('Please select page:'); echo _('Please select page:');
echo "</b></legend><center>\n"; echo "</b></legend><center>\n";
@ -1015,7 +1013,7 @@ class accountContainer {
} }
// display html-code from mdule // display html-code from mdule
$return = array(); $return = array();
if ($this->current_page == 0) { if ($this->current_page == 0) {
if ($this->subpage == 'finish') { if ($this->subpage == 'finish') {
// Show success message // Show success message
if ($this->dn_orig == '') { if ($this->dn_orig == '') {
@ -1066,7 +1064,7 @@ class accountContainer {
0 => array('kind' => 'text', 'text' => _('RDN identifier')), 0 => array('kind' => 'text', 'text' => _('RDN identifier')),
1 => array('kind' => 'select', 'name' => 'rdn', 'options' => $rdnlist, 'options_selected' => $rdnSelected, 'noSorting' => true), 1 => array('kind' => 'select', 'name' => 'rdn', 'options' => $rdnlist, 'options_selected' => $rdnSelected, 'noSorting' => true),
2 => array ('kind' => 'help', 'value' => '301')); 2 => array ('kind' => 'help', 'value' => '301'));
// Get list of profiles // Get list of profiles
$profilelist = getAccountProfiles($this->type); $profilelist = getAccountProfiles($this->type);
if (count($profilelist)!=0) { if (count($profilelist)!=0) {
@ -1087,7 +1085,7 @@ class accountContainer {
2 => array ('kind' => 'help', 'value' => '402')); 2 => array ('kind' => 'help', 'value' => '402'));
} }
} }
else $return = call_user_func(array($this->module[$this->order[$this->current_page]], 'display_html_'.$this->subpage), $post); else $return = call_user_func(array($this->module[$this->order[$this->current_page]], 'display_html_'.$this->subpage));
$y = 5000; $y = 5000;
$z = 10000; $z = 10000;
parseHtml($this->order[$this->current_page], $return, array(), false, $y, $z, $this->type); parseHtml($this->order[$this->current_page], $return, array(), false, $y, $z, $this->type);
@ -1103,7 +1101,7 @@ class accountContainer {
/** /**
* This function checks which LDAP attributes have changed while the account was edited. * This function checks which LDAP attributes have changed while the account was edited.
* *
* @param array $attributes list of current LDAP attributes * @param array $attributes list of current LDAP attributes
* @param array $orig list of old attributes when account was loaded * @param array $orig list of old attributes when account was loaded
* @return array an array which can be passed to $this->saveAccount() * @return array an array which can be passed to $this->saveAccount()
@ -1203,7 +1201,7 @@ class accountContainer {
} }
// save original attributes // save original attributes
$this->attributes_orig = $attr; $this->attributes_orig = $attr;
foreach ($modules as $module) { foreach ($modules as $module) {
if (!isset($this->module[$module])) { if (!isset($this->module[$module])) {
$this->module[$module] = new $module($this->type); $this->module[$module] = new $module($this->type);
@ -1216,7 +1214,7 @@ class accountContainer {
$this->sortModules(); $this->sortModules();
return 0; return 0;
} }
/** /**
* Fixes spelling errors in the attribute names. * Fixes spelling errors in the attribute names.
* *
@ -1529,7 +1527,7 @@ class accountContainer {
/** /**
* Returns a list of possible PDF entries for this account. * Returns a list of possible PDF entries for this account.
* *
* @return list of PDF entries (array(<name> => <PDF lines>)) * @return list of PDF entries (array(<name> => <PDF lines>))
*/ */
function get_pdfEntries() { function get_pdfEntries() {
@ -1602,7 +1600,7 @@ class accountContainer {
array_unshift($order, 'main'); array_unshift($order, 'main');
$this->order = $order; $this->order = $order;
} }
/** /**
* Encrypts sensitive data before storing in session. * Encrypts sensitive data before storing in session.
* *
@ -1616,7 +1614,7 @@ class accountContainer {
// save all attributes // save all attributes
return array_keys(get_object_vars($this)); return array_keys(get_object_vars($this));
} }
/** /**
* Decrypts sensitive data after accountContainer was loaded from session. * Decrypts sensitive data after accountContainer was loaded from session.
*/ */

View File

@ -81,6 +81,6 @@ if (get_magic_quotes_gpc() == 1) {
} }
// show account page // show account page
$_SESSION['account']->continue_main($_POST); $_SESSION['account']->continue_main();
?> ?>

View File

@ -1,24 +1,24 @@
<?php <?php
/* /*
$Id$ $Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam) This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 - 2006 Tilo Lutz Copyright (C) 2003 - 2006 Tilo Lutz
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
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/** /**
@ -148,7 +148,7 @@ if ($_POST['delete']) {
// load attributes // load attributes
foreach ($module as $singlemodule) { foreach ($module as $singlemodule) {
// load changes // load changes
$temp = $_SESSION['account']->module[$singlemodule]->delete_attributes($_POST); $temp = $_SESSION['account']->module[$singlemodule]->delete_attributes();
if (is_array($temp)) { if (is_array($temp)) {
// merge changes // merge changes
$DNs = array_keys($temp); $DNs = array_keys($temp);
@ -260,7 +260,7 @@ function getChildCount($dn) {
/** /**
* Deletes a DN and all child entries. * Deletes a DN and all child entries.
* *
* @param string $dn DN to delete * @param string $dn DN to delete
* @return array error messages * @return array error messages
*/ */