summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c2b9a2d)
raw | patch | inline | side by side (parent: c2b9a2d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Apr 2006 11:06:10 +0000 (11:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Apr 2006 11:06:10 +0000 (11:06 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2989 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_ppdManager.inc | patch | blob | history |
index 86f6c538567661e1317366b6ce201bc244fed88c..a5fad07309cc51686f14454dc121246d4b754ddb 100644 (file)
$section= preg_replace('/^\*/', '', $section);
$attribute= preg_replace('/^\*/', '', $attribute);
- $rp= fopen($file, "r");
- $wp= fopen("$file.tmp", "w");
+ $rp= @fopen($file, "r");
+ $wp= @fopen("$file.tmp", "w");
+
+
while (!feof($rp)){
$lines[]= fgets($rp, 1024);
function saveProperties($ppdFile, $properties)
{
- foreach ($properties as $name => $section){
- foreach ($section as $attribute => $value){
- if (is_array($value)){
- $this->updateAttribute($ppdFile, $name, $attribute, $value['_default']);
+ if(!is_readable($ppdFile)){
+ print_red(sprintf(_("Specified ppd file '%s' can't be opened for reading."),$ppdFile));
+ }elseif(is_writeable($ppdFile.".tmp")){
+ print_red(sprintf(_("The required tmp file file '%s' can't be opened for writing."),$ppdFile.".tmp"));
+ }else{
+
+ foreach ($properties as $name => $section){
+ foreach ($section as $attribute => $value){
+ if (is_array($value)){
+ $this->updateAttribute($ppdFile, $name, $attribute, $value['_default']);
+ }
}
}
}