Skip to content

Commit

Permalink
Fixed 0015472
Browse files Browse the repository at this point in the history
  • Loading branch information
chfsx committed Feb 24, 2015
1 parent 24704ec commit 85e2ebc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Modules/Bibliographic/classes/class.ilObjBibliographic.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,10 @@ public function writeSourcefileEntriesToDb() {
$attribute = implode(", ", $attribute);
}
// reduce the attribute strings to a maximum of 4000 (ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH) characters, in order to fit in the database
if (mb_strlen($attribute, 'UTF-8') > self::ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH) {
$attribute = mb_substr($attribute, 0, self::ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH - 3, 'UTF-8') . '...';
//if (mb_strlen($attribute, 'UTF-8') > self::ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH) {
if (ilStr::strLen($attribute) > self::ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH) {
// $attribute = mb_substr($attribute, 0, self::ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH - 3, 'UTF-8') . '...';
$attribute = ilStr::subStr($attribute, 0, self::ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH - 3) . '...';
}
// ty (RIS) or entryType (BIB) is the type and is treated seperately
if (strtolower($key) == 'ty' || strtolower($key) == 'entrytype') {
Expand Down

0 comments on commit 85e2ebc

Please sign in to comment.