From: hickert Date: Thu, 8 Jul 2010 13:33:54 +0000 (+0000) Subject: Updated FAIscript and encoding handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=64bd7c8abc2c3dae78f5d602cee35d9254964686;p=gosa.git 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 --- 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; + } + } } }