Fix Horde_Mime::isChild() for X.0 type MIME IDs
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 10 Feb 2010 08:42:02 +0000 (01:42 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 10 Feb 2010 08:42:02 +0000 (01:42 -0700)
framework/Mime/lib/Horde/Mime.php

index 5472b04..1d6aea0 100644 (file)
@@ -678,8 +678,12 @@ class Horde_Mime
      */
     static public function isChild($base, $id)
     {
+        if (substr($base, -2) == '.0') {
+            $base = substr($base, 0, -1);
+        }
+
         return ((($base == 0) && ($id != 0)) ||
-                strpos(strval($id), strval($base)) === 0);
+                (strpos(strval($id), strval($base)) === 0));
     }
 
     /**