*/
public function delete()
{
+ $db = new Database();
+ $db->getIndexer()->deleteRepo($this);
+
return Tools::recursiveDelete($this->workDir)
&& 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')) {
$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;