Code

Updated debconf template extraction.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 29 Apr 2008 13:41:12 +0000 (13:41 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 29 Apr 2008 13:41:12 +0000 (13:41 +0000)
-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

index 7f753a0d476afa6469b896771288aea92a07a579..bbbbbadf202cdcdc9b48333d1bf9a35d63c23b9f 100644 (file)
@@ -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="
       <tr>