From 2e9b0ac24924767ce2dacc7d95ddc0fe54f40e17 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 29 Apr 2008 13:41:12 +0000 Subject: [PATCH] Updated debconf template extraction. -Some templates use the capitalized "Description" and some use the lower case "description" git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10724 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/fai/admin/fai/class_debconfTemplate.inc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_debconfTemplate.inc b/gosa-plugins/fai/admin/fai/class_debconfTemplate.inc index 7f753a0d4..bbbbbadf2 100644 --- a/gosa-plugins/fai/admin/fai/class_debconfTemplate.inc +++ b/gosa-plugins/fai/admin/fai/class_debconfTemplate.inc @@ -61,9 +61,8 @@ class debconf } /* Get description */ - if (!$got_local_description && preg_match("/^Description: /", $line)){ - $this->template[$post_name]['Description']= ""; - $description= trim(preg_replace("/^Description: (.*)$/", "\\1", $line)); + if (!$got_local_description && preg_match("/^Description: /i", $line)){ + $description= trim(preg_replace("/^Description: (.*)$/i", "\\1", $line)); $this->template[$post_name]['Topic']= $description; $this->template[$post_name]['Description']= ""; $in_description= TRUE; @@ -78,8 +77,8 @@ class debconf } /* Get local description */ - if (preg_match("/^Description-$langcode: /", $line)){ - $description= trim(preg_replace("/^Description-$langcode: (.*)$/", "\\1", $line)); + if (preg_match("/^Description-$langcode: /i", $line)){ + $description= trim(preg_replace("/^Description-$langcode: (.*)$/i", "\\1", $line)); $this->template[$post_name]['Topic']= $description; $in_description= TRUE; $got_local_description= TRUE; @@ -212,7 +211,6 @@ class debconf function render_boolean($data) { - $post_name= $data['post_name']; $result=" -- 2.30.2