X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/4059ede1cb9e1a73b7b30644c89d350a675c2d7d..d825c02210d38851f7bb55555e2f93e72cd90b4f:/src/phorkie/Repository/Commit.php diff --git a/src/phorkie/Repository/Commit.php b/src/phorkie/Repository/Commit.php index 7c66673..1afc151 100644 --- a/src/phorkie/Repository/Commit.php +++ b/src/phorkie/Repository/Commit.php @@ -16,21 +16,8 @@ class Repository_Commit public function getIconUrl() { - if ($this->committerEmail == 'anonymous@phorkie') { - return '/phorkie/anonymous.png'; - } - - //workaround for https://pear.php.net/bugs/bug.php?id=19384 - require_once 'PEAR/Services/Libravatar.php'; - - $s = new \Services_Libravatar(); - return $s->url( - $this->committerEmail, - array( - 'size' => 32, - 'default' => Tools::fullUrl('/phorkie/anonymous.png') - ) - ); + $hh = new HtmlHelper(); + return $hh->getIconUrl($this->committerEmail); } /** @@ -47,7 +34,9 @@ class Repository_Commit $r = intval($r / $quot); $g = intval($g / $quot); } - $string = str_repeat('g', $g) . str_repeat('r', $r) . str_repeat('n', 7 - $g - $r); + $string = str_repeat('g', $g) + . str_repeat('r', $r) + . str_repeat('n', 7 - $g - $r); return str_split($string); } @@ -73,4 +62,4 @@ class Repository_Commit } } -?> \ No newline at end of file +?>