From 64bd7c8abc2c3dae78f5d602cee35d9254964686 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 8 Jul 2010 13:33:54 +0000 Subject: [PATCH] Updated FAIscript and encoding handling -Respect encoding modification for uploaded scripts too. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18967 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc b/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc index edafad3cf..9f42d3302 100644 --- a/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc @@ -76,6 +76,14 @@ class faiScriptEntry extends plugin }else{ $str = file_get_contents($_FILES['ImportFile']['tmp_name']); $this->FAIscript = $str; + + // Check encoding again + if($this->mb_extension){ + $this->enc_before_edit = mb_detect_encoding($this->FAIscript); + if($this->enc_before_edit != "ASCII"){ + $this->write_protect = TRUE; + } + } } } -- 2.30.2