Indefero

Indefero Commit Details


Date:2009-05-07 02:54:09 (15 years 7 months ago)
Author:Loic d'Anterroches
Branch:develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:3c162486e44199448fe2f0e5ad744b5476cc15ec
Parents: 903c457439f7777bffd3e94b3902b96e7753c892
Message:Fixed crash with non UTF-8 encoded change log.

Changes:

File differences

src/IDF/Commit.php
148148
149149
150150
151
152
151
152
153
154
155
156
157
158
159
160
161
162
163
153164
154165
155166
$commit = new IDF_Commit();
$commit->project = $project;
$commit->scm_id = $change->commit;
$commit->summary = $change->title;
$commit->fullmessage = $change->full_message;
if (Pluf_Text_UTF8::check($change->title)) {
$commit->summary = $change->title;
$commit->fullmessage = $change->full_message;
} else {
// Not in utf8, so we try to detect the encoding and
// convert accordingly.
$encoding = mb_detect_encoding($change->title, mb_detect_order(), true);
if ($encoding == false) {
$encoding = Pluf_Text_UTF8::detect_cyr_charset($change->title);
}
$commit->summary = mb_convert_encoding($change->title, 'UTF-8', $encoding);
$commit->fullmessage = mb_convert_encoding($change->full_message, 'UTF-8', $encoding);
}
$commit->author = $scm->findAuthor($change->author);
$commit->origauthor = $change->author;
$commit->creation_dtime = $change->date;

Archive Download the corresponding diff file

Page rendered in 0.08319s using 13 queries.