- correct links on client-settings page

- added new server_id parameter to buildFormEx, so getFormGroupOutput will use the correct template (with correct links)
This commit is contained in:
Michael Kaufmann (d00p)
2010-10-20 07:40:34 +00:00
parent d3fd4ee2f4
commit 836b7fb056
7 changed files with 31 additions and 8 deletions

View File

@@ -15,7 +15,7 @@
* @version $Id $
*/
function buildFormEx($form, $part = '')
function buildFormEx($form, $part = '', $server_id = 0)
{
$fields = '';
@@ -28,7 +28,7 @@ function buildFormEx($form, $part = '')
{
if(isset($groupdetails['title']) && $groupdetails['title'] != '')
{
$fields .= getFormOverviewGroupOutput($groupname, $groupdetails);
$fields .= getFormOverviewGroupOutput($groupname, $groupdetails, $server_id);
}
}
// only show one section

View File

@@ -24,7 +24,7 @@ function getFormGroupOutput($groupname, $groupdetails)
return $group;
}
function getFormOverviewGroupOutput($groupname, $groupdetails)
function getFormOverviewGroupOutput($groupname, $groupdetails, $server_id = 0)
{
global $lng, $settings, $filename, $s;
@@ -81,6 +81,16 @@ function getFormOverviewGroupOutput($groupname, $groupdetails)
}
}
eval("\$group = \"" . getTemplate("settings/settings_overviewgroup") . "\";");
// if the server_id is > 0 then
// this is a client-settings page
// and we need another template
if($server_id > 0)
{
eval("\$group = \"" . getTemplate("froxlorclients/froxlorclient_settingsoverviewgroup") . "\";");
}
else
{
eval("\$group = \"" . getTemplate("settings/settings_overviewgroup") . "\";");
}
return $group;
}

View File

@@ -82,10 +82,11 @@ function loadConfigArrayDir()
&& is_array($selection)
&& isset($selection[0])
) {
$_data['groups'] = array();
foreach($data['groups'] as $group => $data)
{
if(in_array($group, $selection)) {
$_data[$group] = $data;
$_data['groups'][$group] = $data;
}
}
$data = $_data;