<div class="commit-message"><?php echo Chora::formatLogMessage($logMessage->queryLog()) ?></div>
<div class="commit-author">
+ <div class="commit-author-avatar">
+ <img src="http://www.gravatar.com/avatar/<?php echo md5(strtolower(trim(Chora::getAuthorEmail($logMessage->queryAuthor())))) ?>?d=mm&s=40">
+ </div>
<?php echo Chora::showAuthorName($logMessage->queryAuthor(), true) ?><br>
<?php echo Chora::formatDate($logMessage->queryDate()) ?>
</div>
return htmlspecialchars($name);
}
+ public function getAuthorEmail($name)
+ {
+ try {
+ $users = $GLOBALS['VC']->getUsers($GLOBALS['conf']['paths']['cvsusers']);
+ if (isset($users[$name])) {
+ return $users[$name]['mail'];
+ }
+ } catch (Horde_Vcs_Exception $e) {}
+
+ try {
+ $parser = new Horde_Mail_Rfc822();
+ $results = $parser->parseAddressList($name);
+ if (count($results)) {
+ return $results[0]->mailbox . '@' . $results[0]->host;
+ }
+ } catch (Horde_Mail_Exception $e) {}
+
+ return $name;
+ }
+
/**
* Return formatted date information.
*