summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-30 14:41:37 +0200
committerLukas Reschke <lukas@statuscode.ch>2017-01-13 18:33:42 +0100
commit587eca3ccd83d2aa03f723d2f438d2d731e83045 (patch)
tree3415cd35df5943329bde9b886ca9a7edc579dc99 /lib/private/legacy
parent1e453576dd5cc22596f8daea060daf353513c261 (diff)
downloadnextcloud-server-587eca3ccd83d2aa03f723d2f438d2d731e83045.tar.gz
nextcloud-server-587eca3ccd83d2aa03f723d2f438d2d731e83045.zip
Remove the magic parsing of the description
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/app.php26
1 files changed, 2 insertions, 24 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index 8ef7e08c733..a989ba94001 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -1307,30 +1307,8 @@ class OC_App {
$data['description'] = self::findBestL10NOption($data['description'], $lang);
}
- // just modify the description if it is available
- // otherwise this will create a $data element with an empty 'description'
- if (isset($data['description'])) {
- if (is_string($data['description'])) {
- // sometimes the description contains line breaks and they are then also
- // shown in this way in the app management which isn't wanted as HTML
- // manages line breaks itself
-
- // first of all we split on empty lines
- $paragraphs = preg_split("!\n[[:space:]]*\n!mu", $data['description']);
-
- $result = [];
- foreach ($paragraphs as $value) {
- // replace multiple whitespace (tabs, space, newlines) inside a paragraph
- // with a single space - also trims whitespace
- $result[] = trim(preg_replace('![[:space:]]+!mu', ' ', $value));
- }
-
- // join the single paragraphs with a empty line in between
- $data['description'] = implode("\n\n", $result);
-
- } else {
- $data['description'] = '';
- }
+ if (!isset($data['description'])) {
+ $data['description'] = '';
}
return $data;