Plugin/template icons code changes
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
======================
|
======================
|
||||||
Version Description
|
Version Description
|
||||||
|
|
||||||
|
1.0.44......Plugin/template icons code changes.
|
||||||
1.0.43......Add Swedish translation, thanks to Anders Malm.
|
1.0.43......Add Swedish translation, thanks to Anders Malm.
|
||||||
1.0.42......Update to new simplified bastille config, obsolete code cleanup.
|
1.0.42......Update to new simplified bastille config, obsolete code cleanup.
|
||||||
1.0.41......Set target jail path on advanced config editor by default.
|
1.0.41......Set target jail path on advanced config editor by default.
|
||||||
|
|||||||
@@ -212,9 +212,11 @@ function get_jail_infos() {
|
|||||||
$r['stat'] = $img_path['dis'];
|
$r['stat'] = $img_path['dis'];
|
||||||
endif;
|
endif;
|
||||||
// Display custom template icons if available.
|
// Display custom template icons if available.
|
||||||
$item = $item;
|
$template_icon = "{$jail_dir}/{$item}/plugin_icon.png";
|
||||||
$template_icon = "{$image_dir}/{$item}_icon.png";
|
|
||||||
if(file_exists($template_icon)):
|
if(file_exists($template_icon)):
|
||||||
|
if(!file_exists("{$image_dir}/{$item}_icon.png")):
|
||||||
|
copy("$template_icon", "{$image_dir}/{$item}_icon.png");
|
||||||
|
endif;
|
||||||
$r['logo'] = "{$image_dir}/{$item}_icon.png";
|
$r['logo'] = "{$image_dir}/{$item}_icon.png";
|
||||||
else:
|
else:
|
||||||
// Display standard FreeBSD icon.
|
// Display standard FreeBSD icon.
|
||||||
@@ -225,5 +227,4 @@ function get_jail_infos() {
|
|||||||
endforeach;
|
endforeach;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ if($_POST):
|
|||||||
$container['jailname'] = $_POST['jailname'];
|
$container['jailname'] = $_POST['jailname'];
|
||||||
$confirm_name = $pconfig['confirmname'];
|
$confirm_name = $pconfig['confirmname'];
|
||||||
$item = $container['jailname'];
|
$item = $container['jailname'];
|
||||||
|
$plugin_icon = "{$image_dir}/{$item}_icon.png";
|
||||||
|
|
||||||
if(strcmp($confirm_name, $item) !== 0):
|
if(strcmp($confirm_name, $item) !== 0):
|
||||||
$input_errors[] = gtext("Failed to destroy container, name confirmation is required.");
|
$input_errors[] = gtext("Failed to destroy container, name confirmation is required.");
|
||||||
@@ -304,6 +305,9 @@ if($_POST):
|
|||||||
unset($output,$retval);mwexec2($cmd,$output,$retval);
|
unset($output,$retval);mwexec2($cmd,$output,$retval);
|
||||||
if($retval == 0):
|
if($retval == 0):
|
||||||
exec("/usr/sbin/sysrc -f {$configfile} -qx {$item}_AUTO_START");
|
exec("/usr/sbin/sysrc -f {$configfile} -qx {$item}_AUTO_START");
|
||||||
|
if(file_exists($plugin_icon)):
|
||||||
|
unlink($plugin_icon);
|
||||||
|
endif;
|
||||||
header('Location: bastille_manager_gui.php');
|
header('Location: bastille_manager_gui.php');
|
||||||
exit;
|
exit;
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user