Implement request #12: DOAP documents for all pastes
[phorkie.git] / src / phorkie / Repository.php
index 3c2da644c2db1abae62bc6b03a4ac03f3ca339d5..46b2f6526fa4d2ee083a6e541141361ce638a436 100644 (file)
@@ -228,6 +228,8 @@ class Repository
             return '/' . $this->id;
         } else if ($type == 'fork') {
             return '/' . $this->id . '/fork';
+        } else if ($type == 'doap') {
+            return '/' . $this->id . '/doap';
         } else if ($type == 'delete') {
             return '/' . $this->id . '/delete';
         } else if ($type == 'delete-confirm') {
@@ -282,7 +284,9 @@ class Repository
             $arLineParts = explode(' ', trim($arOutput[$current + 4]));
             $commit->filesChanged = $arLineParts[0];
             $commit->linesAdded   = $arLineParts[3];
-            $commit->linesDeleted = $arLineParts[5];
+            if (isset($arLineParts[5])) {
+                $commit->linesDeleted = $arLineParts[5];
+            }
 
             $current += 6;