few minor changes for multiserver-support

This commit is contained in:
Michael Kaufmann (d00p)
2010-10-18 11:34:19 +00:00
parent 8d27f71cee
commit f42fa0ee7b
6 changed files with 72 additions and 12 deletions

View File

@@ -52,6 +52,12 @@ class froxlorclient
*/
private $c_data = array();
/**
* Client Settings_Data Array
* @var s_data
*/
private $s_data = array();
/**
* Client-Object-Array
* @var clients
@@ -154,7 +160,7 @@ class froxlorclient
`" . TABLE_FROXLOR_CLIENTS . "`
SET
`name` = '" . $this->db->escape($this->Get('name')) . "',
`ip` = '" . $this->db->escape($this->Get('ip')) . "',
`desc` = '" . $this->db->escape($this->Get('desc')) . "',
`enabled` = '" . (int)$this->Get('enabled') . "'
WHERE
`id` = '" . (int)$this->cid . "';
@@ -194,6 +200,24 @@ class froxlorclient
return true;
}
/**
* return the complete client-settings array
* for the settings page
*/
public function getSettingsArray()
{
return $this->Get('settings');
}
/**
* return the complete client-settings-data array
* for the settings page
*/
public function getSettingsData()
{
return $this->s_data;
}
/**
* get a value from the internal data array
*
@@ -338,11 +362,11 @@ class froxlorclient
&& $this->cid != - 1
) {
$spath = makeCorrectDir(dirname(dirname(dirname(dirname(__FILE__)))));
$settings_data = loadConfigArrayDir(
$this->s_data = loadConfigArrayDir(
makeCorrectDir($spath.'/actions/admin/settings/'),
makeCorrectDir($spath.'/actions/multiserver/clientsettings/')
);
$settings = loadSettings($settings_data, $db, $this->cid);
$settings = loadSettings($this->s_data, $db, $this->cid);
foreach($settings as $group => $fv)
{