1
0
Fork 0
mirror of https://github.com/Yetangitu/owncloud-apps.git synced 2025-10-02 14:49:17 +02:00

Forcibly trim 'description' field to <2048 (using 2044) characters, otherwise postgresql is unhappy...

This commit is contained in:
frankdelange 2015-02-12 23:49:02 +01:00
parent b79ff12b09
commit 113aff42e6

View file

@ -93,7 +93,7 @@ class Meta
$meta['publisher'], $meta['publisher'],
$meta['isbn'], $meta['isbn'],
$meta['copyright'], $meta['copyright'],
$meta['description'], mb_strimwidth($meta['description'],0,2044,'...'),
$meta['subjects'], $meta['subjects'],
$meta['cover'], $meta['cover'],
$meta['rescan'], $meta['rescan'],
@ -112,7 +112,7 @@ class Meta
$meta['publisher'], $meta['publisher'],
$meta['isbn'], $meta['isbn'],
$meta['copyright'], $meta['copyright'],
$meta['description'], mb_strimwidth($meta['description'],0,2044,'...'),
$meta['subjects'], $meta['subjects'],
$meta['cover'], $meta['cover'],
$meta['rescan'] $meta['rescan']
@ -246,7 +246,7 @@ class Meta
$value = trim($value); $value = trim($value);
} }
if (!($value == '')) { if (isset($value) && !($value == '')) {
switch ($key) { switch ($key) {
case 'Title': case 'Title':
$meta['title'] = $value; $meta['title'] = $value;