- 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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user