fixed call-by-reference warnings

This commit is contained in:
Roland Gruber 2005-02-16 21:00:19 +00:00
parent 1e6c7bc8bd
commit 360e580d79
15 changed files with 60 additions and 54 deletions

View File

@ -197,7 +197,7 @@ class cache {
foreach ($scopes as $scope) { foreach ($scopes as $scope) {
// Get Scope // Get Scope
If ($scope != '*') If ($scope != '*')
$suffix = call_user_func(array(&$_SESSION['config'], 'get_'.ucfirst($scope).'Suffix')); $suffix = call_user_func(array($_SESSION['config'], 'get_'.ucfirst($scope).'Suffix'));
else $suffix = ''; else $suffix = '';
// Get Data from ldap // Get Data from ldap
$search = $this->attributes[$scope]; $search = $this->attributes[$scope];
@ -239,7 +239,7 @@ class cache {
if ($allowed_types[$i]!='*') { if ($allowed_types[$i]!='*') {
// *** fixme, where is get_DomainSuffix // *** fixme, where is get_DomainSuffix
If ($scope != '*') If ($scope != '*')
$suffix = call_user_func(array(&$_SESSION['config'], 'get_'.ucfirst($allowed_types[$i]).'Suffix')); $suffix = call_user_func(array($_SESSION['config'], 'get_'.ucfirst($allowed_types[$i]).'Suffix'));
else $suffix = ''; else $suffix = '';
if (substr($suffix, $dn)) $singlescope = $allowed_types[$i]; if (substr($suffix, $dn)) $singlescope = $allowed_types[$i];
} }
@ -250,7 +250,7 @@ class cache {
// Get Scope // Get Scope
foreach ($allowed_types as $scope) { foreach ($allowed_types as $scope) {
if ($scope!='*') { if ($scope!='*') {
$suffix = call_user_func(array(&$_SESSION['config'], 'get_'.ucfirst($scope).'Suffix')); $suffix = call_user_func(array($_SESSION['config'], 'get_'.ucfirst($scope).'Suffix'));
if (strpos($dn, $suffix)) $singlescope = $scope; if (strpos($dn, $suffix)) $singlescope = $scope;
} }
} }

View File

@ -640,7 +640,7 @@ class accountContainer {
} }
} }
} }
else $result = call_user_func(array(&$this->module[$this->order[$this->current_page]], 'proccess_'.$this->subpage), &$post); else $result = call_user_func(array(&$this->module[$this->order[$this->current_page]], 'proccess_'.$this->subpage), $post);
} }
if (is_string($result)) $this->subpage = $result; if (is_string($result)) $this->subpage = $result;
if (is_int($result)) { if (is_int($result)) {
@ -720,7 +720,7 @@ class accountContainer {
if (count($table)!=0) $return[] = array ( 0 => array ( 'kind' => 'table', 'value' => $table ) ); if (count($table)!=0) $return[] = array ( 0 => array ( 'kind' => 'table', 'value' => $table ) );
// loop through all suffixes // loop through all suffixes
$rootsuffix = call_user_func(array(&$_SESSION['config'], 'get_' . ucfirst($this->type) . 'Suffix')); $rootsuffix = call_user_func(array($_SESSION['config'], 'get_' . ucfirst($this->type) . 'Suffix'));
foreach ($_SESSION['ldap']->search_units($rootsuffix) as $suffix) { foreach ($_SESSION['ldap']->search_units($rootsuffix) as $suffix) {
if ($this->dn == $suffix) $option_selected = $suffix; if ($this->dn == $suffix) $option_selected = $suffix;
$suffixes[] = $suffix; $suffixes[] = $suffix;
@ -766,8 +766,10 @@ class accountContainer {
'value' => _('Back to account list'))); 'value' => _('Back to account list')));
} }
} }
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), $post);
$this->parse_html($this->order[$this->current_page], $return); $y = 5000;
$z = 10000;
$this->parse_html($this->order[$this->current_page], $return, $y, $z);
// Display rest of html-page // Display rest of html-page
echo "</fieldset>\n"; echo "</fieldset>\n";
echo "</td></tr></table>\n"; echo "</td></tr></table>\n";
@ -777,7 +779,7 @@ class accountContainer {
return 0; return 0;
} }
function parse_html($module, $input, $y=5000, $z=10000) { function parse_html($module, $input, &$y, &$z) {
/* $y and $z are used to change the the taborder. /* $y and $z are used to change the the taborder.
* Unfortunatly we don't now how many taborders we need * Unfortunatly we don't now how many taborders we need
* Every link also help needs a taborder. * Every link also help needs a taborder.
@ -826,7 +828,7 @@ class accountContainer {
echo ">\n"; echo ">\n";
echo "<fieldset>\n"; echo "<fieldset>\n";
if ($input[$i][$j]['legend']!='') echo "<legend>" . $input[$i][$j]['legend'] . "</legend>\n"; if ($input[$i][$j]['legend']!='') echo "<legend>" . $input[$i][$j]['legend'] . "</legend>\n";
$this->parse_html($module, $input[$i][$j]['value'], &$y, &$z); $this->parse_html($module, $input[$i][$j]['value'], $y, $z);
echo "</fieldset>\n"; echo "</fieldset>\n";
break; break;
case 'select': case 'select':
@ -859,7 +861,7 @@ class accountContainer {
echo "<td"; echo "<td";
if ($input[$i][$j]['td']['valign']!='') echo ' valign="' . $input[$i][$j]['td']['valign'] .'"'; if ($input[$i][$j]['td']['valign']!='') echo ' valign="' . $input[$i][$j]['td']['valign'] .'"';
echo ">\n"; echo ">\n";
$this->parse_html($module, $input[$i][$j]['value'], &$y, &$z); $this->parse_html($module, $input[$i][$j]['value'], $y, $z);
echo "</td>\n"; echo "</td>\n";
break; break;
case 'help': case 'help':
@ -1247,7 +1249,7 @@ class accountContainer {
// TODO remove this function? // TODO remove this function?
function proccess_profile($post) { function proccess_profile(&$post) {
$return = array(); $return = array();
$module = array_keys ($this->module); $module = array_keys ($this->module);
foreach ($module as $singlemodule) { foreach ($module as $singlemodule) {

View File

@ -143,7 +143,7 @@ class account extends baseModule {
/* Write variables into object and do some regexp checks /* Write variables into object and do some regexp checks
*/ */
function proccess_attributes($post) { function proccess_attributes(&$post) {
// Load attributes // Load attributes
$this->attributes['description'][0] = $post['description']; $this->attributes['description'][0] = $post['description'];
return 0; return 0;
@ -153,7 +153,7 @@ class account extends baseModule {
* to show a page with all attributes. * to show a page with all attributes.
* It will output a complete html-table * It will output a complete html-table
*/ */
function display_html_attributes($post) { function display_html_attributes(&$post) {
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Description') ), $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Description') ),
1 => array ( 'kind' => 'input', 'name' => 'description', 'type' => 'text', 'size' => '30', 1 => array ( 'kind' => 'input', 'name' => 'description', 'type' => 'text', 'size' => '30',
'maxlength' => '255', 'value' => $this->attributes['description'][0] ), 'maxlength' => '255', 'value' => $this->attributes['description'][0] ),
@ -162,7 +162,7 @@ class account extends baseModule {
return $return; return $return;
} }
function display_html_delete($post) { function display_html_delete(&$post) {
return 0; return 0;
} }

View File

@ -138,7 +138,7 @@ class ieee802Device extends baseModule {
* *
* @param array $post HTTP-POST values * @param array $post HTTP-POST values
*/ */
function display_html_attributes($post) { function display_html_attributes(&$post) {
$return = array(); $return = array();
// list current MACs // list current MACs
for ($i = 0; $i < sizeof($this->attributes['macAddress']); $i++) { for ($i = 0; $i < sizeof($this->attributes['macAddress']); $i++) {
@ -163,7 +163,7 @@ class ieee802Device extends baseModule {
* *
* @param array $post HTTP-POST values * @param array $post HTTP-POST values
*/ */
function proccess_attributes($post) { function proccess_attributes(&$post) {
$this->triggered_messages = array(); $this->triggered_messages = array();
$this->attributes['macAddress'] = array(); $this->attributes['macAddress'] = array();
// check old MACs // check old MACs

View File

@ -192,7 +192,7 @@ class inetLocalMailRecipient extends baseModule {
* *
* @param array $post HTTP-POST values * @param array $post HTTP-POST values
*/ */
function display_html_attributes($post) { function display_html_attributes(&$post) {
$return = array(); $return = array();
// mail routing address // mail routing address
$return[] = array( $return[] = array(
@ -227,7 +227,7 @@ class inetLocalMailRecipient extends baseModule {
* *
* @param array $post HTTP-POST values * @param array $post HTTP-POST values
*/ */
function proccess_attributes($post) { function proccess_attributes(&$post) {
$this->triggered_messages = array(); $this->triggered_messages = array();
$this->attributes['mailRoutingAddress'] = array(); $this->attributes['mailRoutingAddress'] = array();
$this->attributes['mailLocalAddress'] = array(); $this->attributes['mailLocalAddress'] = array();

View File

@ -350,7 +350,7 @@ class inetOrgPerson extends baseModule {
return 0; return 0;
} }
function proccess_attributes($post) { function proccess_attributes(&$post) {
// Load attributes // Load attributes
$this->attributes['description'][0] = $post['description']; $this->attributes['description'][0] = $post['description'];
$this->attributes['sn'][0] = $post['sn']; $this->attributes['sn'][0] = $post['sn'];
@ -397,7 +397,7 @@ class inetOrgPerson extends baseModule {
* to show a page with all attributes. * to show a page with all attributes.
* It will output a complete html-table * It will output a complete html-table
*/ */
function display_html_attributes($post) { function display_html_attributes(&$post) {
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Description') ), $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Description') ),
1 => array ( 'kind' => 'input', 'name' => 'description', 'type' => 'text', 'size' => '30', 1 => array ( 'kind' => 'input', 'name' => 'description', 'type' => 'text', 'size' => '30',
'maxlength' => '255', 'value' => $this->attributes['description'][0] ), 'maxlength' => '255', 'value' => $this->attributes['description'][0] ),
@ -457,7 +457,7 @@ class inetOrgPerson extends baseModule {
return $return; return $return;
} }
function display_html_delete($post) { function display_html_delete(&$post) {
return 0; return 0;
} }

View File

@ -162,7 +162,7 @@ class nisMailAlias extends baseModule {
* *
* @param array $post HTTP-POST values * @param array $post HTTP-POST values
*/ */
function display_html_attributes($post) { function display_html_attributes(&$post) {
$return = array(); $return = array();
// alias name // alias name
$return[] = array( $return[] = array(
@ -192,7 +192,7 @@ class nisMailAlias extends baseModule {
* *
* @param array $post HTTP-POST values * @param array $post HTTP-POST values
*/ */
function proccess_attributes($post) { function proccess_attributes(&$post) {
$this->triggered_messages = array(); $this->triggered_messages = array();
$this->attributes['cn'] = array(); $this->attributes['cn'] = array();
$this->attributes['rfc822MailMember'] = array(); $this->attributes['rfc822MailMember'] = array();

View File

@ -585,7 +585,7 @@ class posixAccount extends baseModule {
/* Write variables into object and do some regexp checks /* Write variables into object and do some regexp checks
*/ */
function proccess_attributes($post) { function proccess_attributes(&$post) {
$this->attributes['homeDirectory'][0] = $post['homeDirectory']; $this->attributes['homeDirectory'][0] = $post['homeDirectory'];
$this->attributes['loginShell'][0] = $post['loginShell']; $this->attributes['loginShell'][0] = $post['loginShell'];
if (isset($post['gecos'])) $this->attributes['gecos'][0] = $post['gecos']; if (isset($post['gecos'])) $this->attributes['gecos'][0] = $post['gecos'];
@ -787,7 +787,7 @@ class posixAccount extends baseModule {
/* Write variables into object and do some regexp checks /* Write variables into object and do some regexp checks
*/ */
function proccess_group($post) { function proccess_group(&$post) {
do { // X-Or, only one if() can be true do { // X-Or, only one if() can be true
if (isset($post['addgroups']) && isset($post['addgroups_button'])) { // Add groups to list if (isset($post['addgroups']) && isset($post['addgroups_button'])) { // Add groups to list
// Add new group // Add new group
@ -810,7 +810,7 @@ class posixAccount extends baseModule {
* to show a page with all attributes. * to show a page with all attributes.
* It will output a complete html-table * It will output a complete html-table
*/ */
function display_html_attributes($post) { function display_html_attributes(&$post) {
$groups = $_SESSION['cache']->findgroups(); // list of all groupnames $groups = $_SESSION['cache']->findgroups(); // list of all groupnames
$shelllist = getshells(); // list of all valid shells $shelllist = getshells(); // list of all valid shells
@ -868,7 +868,7 @@ class posixAccount extends baseModule {
return $return; return $return;
} }
function display_html_delete($post) { function display_html_delete(&$post) {
if ($_SESSION[$this->base]->type=='user' && isset($_SESSION['config']->scriptPath)) { if ($_SESSION[$this->base]->type=='user' && isset($_SESSION['config']->scriptPath)) {
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Delete home directory') ), $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Delete home directory') ),
1 => array ( 'kind' => 'input', 'name' => 'deletehomedir', 'type' => 'checkbox'), 1 => array ( 'kind' => 'input', 'name' => 'deletehomedir', 'type' => 'checkbox'),
@ -877,7 +877,7 @@ class posixAccount extends baseModule {
return $return; return $return;
} }
function display_html_group($post) { function display_html_group(&$post) {
// load list with all groups // load list with all groups
$dn_groups = $_SESSION['cache']->get_cache('gidNumber', 'posixGroup', 'group'); $dn_groups = $_SESSION['cache']->get_cache('gidNumber', 'posixGroup', 'group');
$DNs = array_keys($dn_groups); $DNs = array_keys($dn_groups);

View File

@ -121,7 +121,7 @@ class posixGroup extends baseModule {
* to show a page with all attributes. * to show a page with all attributes.
* It will output a complete html-table * It will output a complete html-table
*/ */
function display_html_attributes($post) { function display_html_attributes(&$post) {
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _("Groupname").'*' ), $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _("Groupname").'*' ),
1 => array ( 'kind' => 'input', 'name' => 'cn', 'type' => 'text', 'size' => '20', 'maxlength' => '20', 'value' => $this->attributes['cn'][0]), 1 => array ( 'kind' => 'input', 'name' => 'cn', 'type' => 'text', 'size' => '20', 'maxlength' => '20', 'value' => $this->attributes['cn'][0]),
2 => array ('kind' => 'help', 'value' => 'cn')); 2 => array ('kind' => 'help', 'value' => 'cn'));
@ -159,13 +159,13 @@ class posixGroup extends baseModule {
} }
function display_html_delete($post) { function display_html_delete(&$post) {
// Get list of primary groupmembers. // Get list of primary groupmembers.
return 0; return 0;
} }
function display_html_user($post) { function display_html_user(&$post) {
// load list with all groups // load list with all groups
$dn_users = $_SESSION['cache']->get_cache('uid', 'posixAccount', 'user'); $dn_users = $_SESSION['cache']->get_cache('uid', 'posixAccount', 'user');
if (is_array($dn_users)) { if (is_array($dn_users)) {
@ -441,7 +441,7 @@ class posixGroup extends baseModule {
/* Write variables into object and do some regexp checks /* Write variables into object and do some regexp checks
*/ */
function proccess_attributes($post) { function proccess_attributes(&$post) {
$this->attributes['description'][0] = $post['description']; $this->attributes['description'][0] = $post['description'];
if (($post['userPassword_lock'] && $post['userPassword_invalid']) || ($post['userPassword_nopassword'] && $post['userPassword_invalid'])) { if (($post['userPassword_lock'] && $post['userPassword_invalid']) || ($post['userPassword_nopassword'] && $post['userPassword_invalid'])) {
@ -607,7 +607,7 @@ class posixGroup extends baseModule {
/* Write variables into object and do some regexp checks /* Write variables into object and do some regexp checks
*/ */
function proccess_user($post) { function proccess_user(&$post) {
do { // X-Or, only one if() can be true do { // X-Or, only one if() can be true
if (isset($post['addusers']) && isset($post['addusers_button'])) { // Add groups to list if (isset($post['addusers']) && isset($post['addusers_button'])) { // Add groups to list
// Add new user // Add new user

View File

@ -248,7 +248,7 @@ class quota extends baseModule {
/* Write variables into object and do some regexp checks /* Write variables into object and do some regexp checks
*/ */
function proccess_attributes($post) { function proccess_attributes(&$post) {
// Write all general values into $account_new // Write all general values into $account_new
$i=0; $i=0;
// loop for every mointpoint with quotas // loop for every mointpoint with quotas
@ -286,7 +286,7 @@ class quota extends baseModule {
* to show a page with all attributes. * to show a page with all attributes.
* It will output a complete html-table * It will output a complete html-table
*/ */
function display_html_attributes($post) { function display_html_attributes(&$post) {
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Mountpoint') ), $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Mountpoint') ),
1 => array ( 'kind' => 'text', 'text' => _('Used blocks') ), 1 => array ( 'kind' => 'text', 'text' => _('Used blocks') ),
@ -325,7 +325,7 @@ class quota extends baseModule {
return $return; return $return;
} }
function display_html_delete($post) { function display_html_delete(&$post) {
return 0; return 0;
} }

View File

@ -381,7 +381,11 @@ class sambaAccount extends baseModule {
return $return; return $return;
} }
// Constructor /**
* Initializes the module after it became part of an accountContainer
*
* @param string $base the name of the accountContainer object ($_SESSION[$base])
*/
function init($base) { function init($base) {
// call parent init // call parent init
parent::init($base); parent::init($base);
@ -525,7 +529,7 @@ class sambaAccount extends baseModule {
/* Write variables into object and do some regexp checks /* Write variables into object and do some regexp checks
*/ */
function proccess_attributes($post) { function proccess_attributes(&$post) {
$this->attributes['domain'][0] = $post['domain']; $this->attributes['domain'][0] = $post['domain'];
// Start character // Start character
$flag = "["; $flag = "[";
@ -658,7 +662,7 @@ class sambaAccount extends baseModule {
/* Write variables into object and do some regexp checks /* Write variables into object and do some regexp checks
*/ */
function proccess_userWorkstations($post) { function proccess_userWorkstations(&$post) {
// Load attributes // Load attributes
if ($_SESSION[$this->base]->type=='user') { if ($_SESSION[$this->base]->type=='user') {
do { // X-Or, only one if() can be true do { // X-Or, only one if() can be true
@ -709,7 +713,7 @@ class sambaAccount extends baseModule {
* to show a page with all attributes. * to show a page with all attributes.
* It will output a complete html-table * It will output a complete html-table
*/ */
function display_html_attributes($post) { function display_html_attributes(&$post) {
if ($_SESSION[$this->base]->type=='user') { if ($_SESSION[$this->base]->type=='user') {
$canchangedate = getdate($this->attributes['pwdCanChange'][0]); $canchangedate = getdate($this->attributes['pwdCanChange'][0]);
$mustchangedate = getdate($this->attributes['pwdMustChange'][0]); $mustchangedate = getdate($this->attributes['pwdMustChange'][0]);
@ -825,7 +829,7 @@ class sambaAccount extends baseModule {
return $return; return $return;
} }
function display_html_delete($post) { function display_html_delete(&$post) {
return 0; return 0;
} }
@ -833,7 +837,7 @@ class sambaAccount extends baseModule {
* to show a page with all attributes. * to show a page with all attributes.
* It will output a complete html-table * It will output a complete html-table
*/ */
function display_html_userWorkstations($post) { function display_html_userWorkstations(&$post) {
if ($_SESSION[$this->base]->type=='user') { if ($_SESSION[$this->base]->type=='user') {
// Get list of all hosts. // Get list of all hosts.
$result = $_SESSION['cache']->get_cache('uid', 'sambaAccount', 'host'); $result = $_SESSION['cache']->get_cache('uid', 'sambaAccount', 'host');

View File

@ -142,7 +142,7 @@ class sambaGroupMapping extends baseModule {
* to show a page with all attributes. * to show a page with all attributes.
* It will output a complete html-table * It will output a complete html-table
*/ */
function display_html_attributes($post) { function display_html_attributes(&$post) {
// Get Domain SID from name // Get Domain SID from name
$sambaDomains = search_domains($_SESSION['config']->get_domainSuffix()); $sambaDomains = search_domains($_SESSION['config']->get_domainSuffix());
// Get Domain-SID from group SID // Get Domain-SID from group SID
@ -191,7 +191,7 @@ class sambaGroupMapping extends baseModule {
return $return; return $return;
} }
function display_html_delete($post) { function display_html_delete(&$post) {
return 0; return 0;
} }
@ -390,7 +390,7 @@ class sambaGroupMapping extends baseModule {
/* Write variables into object and do some regexp checks /* Write variables into object and do some regexp checks
*/ */
function proccess_attributes($post) { function proccess_attributes(&$post) {
// Save attributes // Save attributes
$this->attributes['displayName'][0] = $post['displayName']; $this->attributes['displayName'][0] = $post['displayName'];
$this->attributes['sambaGroupType'][0] = $this->sambaGroupTypes[$post['sambaGroupType']]; $this->attributes['sambaGroupType'][0] = $this->sambaGroupTypes[$post['sambaGroupType']];

View File

@ -498,7 +498,7 @@ class sambaSamAccount extends baseModule {
/* Write variables into object and do some regexp checks /* Write variables into object and do some regexp checks
*/ */
function proccess_attributes($post) { function proccess_attributes(&$post) {
// Save attributes // Save attributes
$this->attributes['sambaDomainName'][0] = $post['sambaDomainName']; $this->attributes['sambaDomainName'][0] = $post['sambaDomainName'];
// Get Domain SID from name // Get Domain SID from name
@ -639,7 +639,7 @@ class sambaSamAccount extends baseModule {
/* Write variables into object and do some regexp checks /* Write variables into object and do some regexp checks
*/ */
function proccess_sambaUserWorkstations($post) { function proccess_sambaUserWorkstations(&$post) {
// Load attributes // Load attributes
if ($_SESSION[$this->base]->type=='user') { if ($_SESSION[$this->base]->type=='user') {
do { // X-Or, only one if() can be true do { // X-Or, only one if() can be true
@ -690,7 +690,7 @@ class sambaSamAccount extends baseModule {
* to show a page with all attributes. * to show a page with all attributes.
* It will output a complete html-table * It will output a complete html-table
*/ */
function display_html_attributes($post) { function display_html_attributes(&$post) {
// Get Domain SID from name // Get Domain SID from name
$sambaDomains = search_domains($_SESSION['config']->get_domainSuffix()); $sambaDomains = search_domains($_SESSION['config']->get_domainSuffix());
for ($i=0; $i<count($sambaDomains); $i++ ) { for ($i=0; $i<count($sambaDomains); $i++ ) {
@ -815,7 +815,7 @@ class sambaSamAccount extends baseModule {
return $return; return $return;
} }
function display_html_delete($post) { function display_html_delete(&$post) {
return 0; return 0;
} }
@ -823,7 +823,7 @@ class sambaSamAccount extends baseModule {
* to show a page with all attributes. * to show a page with all attributes.
* It will output a complete html-table * It will output a complete html-table
*/ */
function display_html_sambaUserWorkstations($post) { function display_html_sambaUserWorkstations(&$post) {
if ($_SESSION[$this->base]->type=='user') { if ($_SESSION[$this->base]->type=='user') {
// Get list of all hosts. // Get list of all hosts.
$result = $_SESSION['cache']->get_cache('uid', 'sambaSamAccount', 'host'); $result = $_SESSION['cache']->get_cache('uid', 'sambaSamAccount', 'host');

View File

@ -268,7 +268,7 @@ class shadowAccount extends baseModule {
/* Write variables into object and do some regexp checks /* Write variables into object and do some regexp checks
*/ */
function proccess_attributes($post) { function proccess_attributes(&$post) {
// Load attributes // Load attributes
$this->attributes['shadowMin'][0] = $post['shadowMin']; $this->attributes['shadowMin'][0] = $post['shadowMin'];
$this->attributes['shadowMax'][0] = $post['shadowMax']; $this->attributes['shadowMax'][0] = $post['shadowMax'];
@ -294,7 +294,7 @@ class shadowAccount extends baseModule {
* to show a page with all attributes. * to show a page with all attributes.
* It will output a complete html-table * It will output a complete html-table
*/ */
function display_html_attributes($post) { function display_html_attributes(&$post) {
// Use dd-mm-yyyy format of date because it's easier to read for humans // Use dd-mm-yyyy format of date because it's easier to read for humans
$date = getdate ($this->attributes['shadowExpire'][0]*3600*24); $date = getdate ($this->attributes['shadowExpire'][0]*3600*24);
@ -326,7 +326,7 @@ class shadowAccount extends baseModule {
return $return; return $return;
} }
function display_html_delete($post) { function display_html_delete(&$post) {
return 0; return 0;
} }

View File

@ -49,7 +49,7 @@ class xmlParser {
*/ */
function xmlParser() { function xmlParser() {
$this->xmlParser = xml_parser_create(); $this->xmlParser = xml_parser_create();
xml_set_object($this->xmlParser,&$this); xml_set_object($this->xmlParser,$this);
xml_parser_set_option($this->xmlParser, XML_OPTION_CASE_FOLDING, 1); xml_parser_set_option($this->xmlParser, XML_OPTION_CASE_FOLDING, 1);
xml_parser_set_option($this->xmlParser, XML_OPTION_SKIP_WHITE, 1); xml_parser_set_option($this->xmlParser, XML_OPTION_SKIP_WHITE, 1);
} }