From 207eb1322d5dc99dd091b4ddc8be064aececdfc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20d=27Anterroches?= Date: Mon, 24 Jan 2011 11:53:24 +0100 Subject: [PATCH] Fixed to correctly store utf-8 string in the git cache. --- src/IDF/Commit.php | 2 +- src/IDF/Scm/Cache/Git.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/IDF/Commit.php b/src/IDF/Commit.php index 70414aa..cf779f6 100644 --- a/src/IDF/Commit.php +++ b/src/IDF/Commit.php @@ -154,7 +154,7 @@ class IDF_Commit extends Pluf_Model $commit->summary = self::toUTF8($change->title); $commit->fullmessage = self::toUTF8($change->full_message); $commit->author = $scm->findAuthor($change->author); - $commit->origauthor = $change->author; + $commit->origauthor = self::toUTF8($change->author); $commit->creation_dtime = $change->date; $commit->create(); $commit->notify($project->getConf()); diff --git a/src/IDF/Scm/Cache/Git.php b/src/IDF/Scm/Cache/Git.php index dc905d4..cb32631 100644 --- a/src/IDF/Scm/Cache/Git.php +++ b/src/IDF/Scm/Cache/Git.php @@ -55,7 +55,9 @@ class IDF_Scm_Cache_Git extends Pluf_Model $cache->project = $this->_project; $cache->githash = $blob->hash; $blob->title = IDF_Commit::toUTF8($blob->title); - $cache->content = $blob->date.chr(31).$blob->author.chr(31).$blob->title; + $cache->content = IDF_Commit::toUTF8($blob->date) . chr(31) + . IDF_Commit::toUTF8($blob->author) . chr(31) + . IDF_Commit::toUTF8($blob->title); $sql = new Pluf_SQL('project=%s AND githash=%s', array($this->_project->id, $blob->hash)); if (0 == Pluf::factory(__CLASS__)->getCount(array('filter' => $sql->gen()))) {