Disable editor on commit with --no-edit
[phorkie.git] / src / phorkie / Repository.php
index 5c68ee4806525f79b8c15b0b3fd308cba0103beb..815ef5e4e56ac6a73ba440a86f85947dcb470377 100644 (file)
@@ -274,19 +274,19 @@ class Repository
     public function getLink($type, $option = null, $full = false)
     {
         if ($type == 'edit') {
-            $link = '/' . $this->id . '/edit';
+            $link = $this->id . '/edit';
         } else if ($type == 'display') {
-            $link = '/' . $this->id;
+            $link = $this->id;
         } else if ($type == 'fork') {
-            $link = '/' . $this->id . '/fork';
+            $link = $this->id . '/fork';
         } else if ($type == 'doap') {
-            $link = '/' . $this->id . '/doap';
+            $link = $this->id . '/doap';
         } else if ($type == 'delete') {
-            $link = '/' . $this->id . '/delete';
+            $link = $this->id . '/delete';
         } else if ($type == 'delete-confirm') {
-            $link = '/' . $this->id . '/delete/confirm';
+            $link = $this->id . '/delete/confirm';
         } else if ($type == 'revision') {
-            $link = '/' . $this->id . '/rev/' . $option;
+            $link = $this->id . '/rev/' . $option;
         } else {
             throw new Exception('Unknown link type');
         }
@@ -359,6 +359,14 @@ class Repository
 
         return $arCommits;
     }
+
+    /**
+     * @return Repository_ConnectionInfo
+     */
+    public function getConnectionInfo()
+    {
+        return new Repository_ConnectionInfo($this);
+    }
 }
 
 ?>