Fixed to correctly store utf-8 string in the git cache.
This commit is contained in:
parent
296091e977
commit
207eb1322d
@ -154,7 +154,7 @@ class IDF_Commit extends Pluf_Model
|
|||||||
$commit->summary = self::toUTF8($change->title);
|
$commit->summary = self::toUTF8($change->title);
|
||||||
$commit->fullmessage = self::toUTF8($change->full_message);
|
$commit->fullmessage = self::toUTF8($change->full_message);
|
||||||
$commit->author = $scm->findAuthor($change->author);
|
$commit->author = $scm->findAuthor($change->author);
|
||||||
$commit->origauthor = $change->author;
|
$commit->origauthor = self::toUTF8($change->author);
|
||||||
$commit->creation_dtime = $change->date;
|
$commit->creation_dtime = $change->date;
|
||||||
$commit->create();
|
$commit->create();
|
||||||
$commit->notify($project->getConf());
|
$commit->notify($project->getConf());
|
||||||
|
@ -55,7 +55,9 @@ class IDF_Scm_Cache_Git extends Pluf_Model
|
|||||||
$cache->project = $this->_project;
|
$cache->project = $this->_project;
|
||||||
$cache->githash = $blob->hash;
|
$cache->githash = $blob->hash;
|
||||||
$blob->title = IDF_Commit::toUTF8($blob->title);
|
$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',
|
$sql = new Pluf_SQL('project=%s AND githash=%s',
|
||||||
array($this->_project->id, $blob->hash));
|
array($this->_project->id, $blob->hash));
|
||||||
if (0 == Pluf::factory(__CLASS__)->getCount(array('filter' => $sql->gen()))) {
|
if (0 == Pluf::factory(__CLASS__)->getCount(array('filter' => $sql->gen()))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user