Code

Updated ppManager
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 20 Sep 2010 08:38:53 +0000 (08:38 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 20 Sep 2010 08:38:53 +0000 (08:38 +0000)
-Added nickname to list of collected attributes per ppd file.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19765 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/ppd/class_ppdManager.inc

index 10bea7f05cf9e93152c679379349620bbf62cb38..d75fa472b5764d798f179d4f8acccef18a15fa5f 100644 (file)
@@ -358,9 +358,12 @@ class ppdManager
             if (preg_match('/^\*ModelName:/i', $line)){
                 $ppdDesc['model'] = trim(preg_replace('/^\*ModelName:\s+"?([^"]+)"?.*$/i', '\1', $line));
             }
+            if (preg_match('/^\*ShortNickName:/i', $line)) { 
+                $ppdDesc['nickname'] = trim(preg_replace('/^\*ShortNickName:\s+"?([^"]+)"?.*$/i', '\1', $line)); 
+            } 
 
             /* Got everything we need? Skip rest for speed reasons... */
-            if (isset($ppdDesc['manufacturer'])  && isset($ppdDesc['model'])){
+            if (isset($ppdDesc['manufacturer'])  && isset($ppdDesc['model']) && isset($ppdDesc['nickname'])){
                 break;
             }
         }