summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6145d9e)
raw | patch | inline | side by side (parent: 6145d9e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 15 Oct 2007 13:26:57 +0000 (13:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 15 Oct 2007 13:26:57 +0000 (13:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7554 594d385d-05f5-0310-b6e9-bd551577e9d8
html/main.php | patch | blob | history | |
include/class_config.inc | patch | blob | history | |
plugins/admin/systems/class_printerPPDDialog.inc | patch | blob | history |
diff --git a/html/main.php b/html/main.php
index da788e67e42efe173aa283652c8ad0954b9574ea..50a3e87cf72b4cee54dd97a03541ff53e8afe51e 100644 (file)
--- a/html/main.php
+++ b/html/main.php
exit;
}
$config= $_SESSION['config'];
+$config->check_and_reload();
/* Enable compressed output */
if (isset($config->data['MAIN']['COMPRESSED']) && preg_match('/^(true|on)$/i', $config->data['MAIN']['COMPRESSED'])){
index f1431443cffc69c2abc8f0877408d40d5d165594..ce92a8b30d6d464461bfd44fab1c46f68297c03b 100644 (file)
--- a/include/class_config.inc
+++ b/include/class_config.inc
var $idepartments= array();
var $adepartments= array();
var $tdepartments= array();
+ var $filename = "";
+ var $last_modified = 0;
function config($filename, $basedir= "")
{
}
}
+
+ function check_and_reload()
+ {
+ if($this->filename != "" && filemtime($this->filename) != $this->last_modified){
+ $this->parser = xml_parser_create();
+ xml_set_object($this->parser, $this);
+ xml_set_element_handler($this->parser, "tag_open", "tag_close");
+ $this->parse($this->filename);
+ if(isset($_SESSION['plist'])){
+ unset($_SESSION['plist']);
+ }
+ if(isset($_SESSION['plug'])){
+ unset($_SESSION['plug']);
+ }
+ if(isset($_GET['plug'])){
+ unset($_GET['plug']);
+ }
+ }
+ }
+
+
function parse($filename)
{
+ $this->last_modified = filemtime($filename);
+ $this->filename = $filename;
$fh= fopen($filename, "r");
$xmldata= fread($fh, 100000);
fclose($fh);
diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc
index 78929670c7f1c277a06507fc056ac3d4e5f62ab4..1863d8deb7d8219c50742f42e5377257854297c8 100644 (file)
print_red(sprintf(_("Can't add new ppd file, the source file '%s' is not accessible."),$_PathOnHdd));
}else{
$this->add_ppd_later = $_PathOnHdd."_back";
- $this->add_later_msg_dialog = new msg_dialog(_("PPD file already exists"),
- _("There is already a ppd file for this kind of printer."),CONFIRM_DIALOG);
+ $this->add_later_msg_dialog = new msg_dialog(_("Overwrite existing PPD"),
+ _("There is already a ppd file for this kind of printer. Do you want to overwrite it?"),CONFIRM_DIALOG);
}
return;
}