diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc
index 9296afe61985cfcd1585baae1e9ef623dcdb16c7..f30c50e5f4e3dbdd8fa912d81be6405c81f7e219 100644 (file)
class printerPPDDialog extends plugin
{
- /* CLI vars */
- var $cli_summary = "Manage server basic objects";
- var $cli_description = "Some longer text\nfor help";
- var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = TRUE;
var $attributes = array("cn");
/* Prepare data */
$values = array();
$name = $settings['_name'];
- $default = $settings['_default'];
+ if (!isset($settings['_default'])){
+ $default = "";
+ } else {
+ $default = $settings['_default'];
+ }
$type = $settings['_type'];
/* Add name to table */
}
return($str);
}
+
+ function removeModifiedPPD()
+ {
+ $path = $this->pathToPPD.$this->pathToModified.$this->selectedPPD['link'];
+
+ if(file_exists($path)){
+ if(is_writeable($path)){
+ if(!@unlink($path)){
+ print_red(sprintf(_("Removing old ppd file '%s' failed."),$path));
+ }
+ }else{
+ print_red(sprintf(_("Removing old ppd file '%s' failed. File is not accessible."),$path));
+ }
+ }else{
+ print_red(sprintf(_("Removing old ppd file '%s' failed. File does not exists or is not accessible."),$path));
+ }
+ }
function check()
{