diff --git a/lam/lib/config.inc b/lam/lib/config.inc
index 7f692c0e..7591e138 100644
--- a/lam/lib/config.inc
+++ b/lam/lib/config.inc
@@ -138,7 +138,7 @@ class Config {
var $pwdhash;
// text to include in user PDF files
- var $pdftext;
+ var $pdftext = "";
// name of configuration file
var $file;
@@ -675,7 +675,10 @@ class Config {
// $value: string containing the text
// returns true if $value has correct format and could be saved
function set_pdftext($value) {
+ // check if text changed
+ if ($value == $this->pdftext) return true;
if (is_string($value)) {
+ // save to file
$pdffile = substr(__FILE__, 0, strlen(__FILE__) - 15) . "/config/pdf/" . $this->file . ".txt";
$file = @fopen($pdffile, "w");
if ($file) {
diff --git a/lam/templates/config/confsave.php b/lam/templates/config/confsave.php
index 206e81d6..b6496053 100644
--- a/lam/templates/config/confsave.php
+++ b/lam/templates/config/confsave.php
@@ -198,7 +198,7 @@ if (!$conf->set_pwdhash($pwdhash)) {
}
if (!$conf->set_pdftext($pdftext)) {
- echo ("" . _("PDF text is invalid!") . "");
+ echo ("" . _("Saving PDF text failed!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}