diff options
Diffstat (limited to 'src/phorkie/Repository.php')
| -rw-r--r-- | src/phorkie/Repository.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/phorkie/Repository.php b/src/phorkie/Repository.php index c854cf1..a57239e 100644 --- a/src/phorkie/Repository.php +++ b/src/phorkie/Repository.php @@ -180,6 +180,16 @@ class Repository && Tools::recursiveDelete($this->gitDir); } + public function getTitle() + { + $desc = $this->getDescription(); + if (trim($desc) != '') { + return $desc; + } + + return 'paste #' . $this->id; + } + public function getDescription() { if (!is_readable($this->gitDir . '/description')) { |
