diff --git a/trunk/gosa-plugins/goto/admin/systems/ppd/class_ppdManager.inc b/trunk/gosa-plugins/goto/admin/systems/ppd/class_ppdManager.inc
index db881d2260709c5b29f8e6f1706c55ea151bb830..4a6d16556e00330cab372ada37b23a165a77a666 100644 (file)
{
if(!(filesize($ppdFile))) {
trigger_error(_('Parsing PPD file failed - File has 0 bytes'));
+ return;
}
$group= "";
/* Possible value? */
if (preg_match("@^\*$eoption\s+@", $line)){
#*PageSize Letter/US Letter: "<>setpagedevice"
- $c= preg_replace("@^\*$eoption\s+([^/]+).*$@", "$1", $line);
+ /* Options can have one of 2 forms:
+ *OptionName OptionValue/TranslationOfValue: ...
+ *OptionName OptionValue: ...
+ i.e. there may be a translation or not.
+ */
+ $c= preg_replace("@^\*$eoption\s+([^/:]+).*$@", "$1", $line);
$d= preg_replace("@^\*$eoption\s+[^/]+/([^:]+).*$@", "$1", $line);
+ if ($d == $line) { /* if there is no translation, use untranslated value*/
+ $d = "$c";
+ }
if(empty($group)){
$properties["NO_SECTION"][$option][trim($c)]= trim($d);
}else{
{
if(!(filesize($ppdFile))) {
trigger_error(_('Parsing PPD file failed - File has 0 bytes'));
+ return;
}
$ppdDesc = array();