Add downloadAllList().
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 4 Dec 2008 23:54:39 +0000 (16:54 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 4 Dec 2008 23:54:39 +0000 (16:54 -0700)
imp/lib/Contents.php

index 9aecb92..025f63c 100644 (file)
@@ -853,4 +853,22 @@ class IMP_Contents
     {
         $this->_statuscache[$id][] = $entry;
     }
+
+    /**
+     * Get download all list.
+     *
+     * @return array  An array of downloadable parts.
+     */
+    public function downloadAllList()
+    {
+        $ret = array();
+
+        foreach ($this->getContentTypeMap() as $key => $val) {
+            if ($this->isAttachment($val)) {
+                $ret[] = $key;
+            }
+        }
+
+        return $ret;
+    }
 }