diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php
index f196f22f..771311fe 100644
--- a/includes/pages/user_news.php
+++ b/includes/pages/user_news.php
@@ -77,8 +77,7 @@ function user_meetings()
*/
function news_text(News $news): string
{
- $text = ReplaceSmilies($news->text);
- $text = preg_replace("/\r\n\r\n/m", '
', $text);
+ $text = preg_replace("/\r\n\r\n/m", '
', $news->text);
return $text;
}
@@ -91,7 +90,7 @@ function display_news(News $news): string
$html = '';
$html .= '
';
$html .= '
';
- $html .= '
' . ($news->is_meeting ? '[Meeting] ' : '') . ReplaceSmilies($news->title) . '
';
+ $html .= '' . ($news->is_meeting ? '[Meeting] ' : '') . $news->title . '
';
$html .= '';
$html .= '
' . news_text($news) . '
';
diff --git a/includes/sys_template.php b/includes/sys_template.php
index 491dc2fe..2f764309 100644
--- a/includes/sys_template.php
+++ b/includes/sys_template.php
@@ -414,46 +414,3 @@ function table_buttons($buttons = [])
{
return '
' . join(' ', $buttons) . '
';
}
-
-/**
- * @param string $msg
- * @return mixed
- */
-function ReplaceSmilies($msg)
-{
- /** @var Assets $assets */
- $assets = app('twig.extension.assets');
-
- foreach (
- [
- ';o))' => 'redface',
- ':-))' => 'redface',
- ';o)' => 'wind',
- ':)' => 'smile',
- ':-)' => 'smile',
- ':(' => 'sad',
- ':-(' => 'sad',
- ':o(' => 'sad',
- ':o)' => 'lol',
- ':D' => 'lol',
- ';o(' => 'cry',
- ';(' => 'cry',
- ';-(' => 'cry',
- '8)' => 'rolleyes',
- '8o)' => 'rolleyes',
- ':P' => 'evil',
- ':-P' => 'evil',
- ':oP' => 'evil',
- ';P' => 'mad',
- ';oP' => 'mad',
- '?)' => 'question',
- ] as $search => $replace
- ) {
- $msg = str_ireplace($search, sprintf(
- '
',
- sprintf($assets->getAsset('assets/emojis/%s.gif'), $replace)
- ), $msg);
- }
-
- return $msg;
-}
diff --git a/package.json b/package.json
index 06619fa1..8b4a0568 100644
--- a/package.json
+++ b/package.json
@@ -6,9 +6,8 @@
"author": "https://github.com/engelsystem/engelsystem/contributors",
"license": "GPL-2.0-only",
"scripts": {
- "build": "npm run -s build:clean && NODE_ENV=production run-p build:assets build:webpack",
+ "build": "npm run -s build:clean && NODE_ENV=production run-p build:webpack",
"build:clean": "rimraf public/assets",
- "build:assets": "node resources/assets/scripts/copyAssets.js",
"build:webpack": "webpack",
"build:watch": "webpack --watch"
},
diff --git a/resources/assets/emojis/cry.gif b/resources/assets/emojis/cry.gif
deleted file mode 100644
index 7d54b1f9..00000000
Binary files a/resources/assets/emojis/cry.gif and /dev/null differ
diff --git a/resources/assets/emojis/evil.gif b/resources/assets/emojis/evil.gif
deleted file mode 100644
index ab1aa8e1..00000000
Binary files a/resources/assets/emojis/evil.gif and /dev/null differ
diff --git a/resources/assets/emojis/lol.gif b/resources/assets/emojis/lol.gif
deleted file mode 100644
index 374ba150..00000000
Binary files a/resources/assets/emojis/lol.gif and /dev/null differ
diff --git a/resources/assets/emojis/mad.gif b/resources/assets/emojis/mad.gif
deleted file mode 100644
index 1f6c3c2f..00000000
Binary files a/resources/assets/emojis/mad.gif and /dev/null differ
diff --git a/resources/assets/emojis/question.gif b/resources/assets/emojis/question.gif
deleted file mode 100644
index 9d072265..00000000
Binary files a/resources/assets/emojis/question.gif and /dev/null differ
diff --git a/resources/assets/emojis/redface.gif b/resources/assets/emojis/redface.gif
deleted file mode 100644
index ad762832..00000000
Binary files a/resources/assets/emojis/redface.gif and /dev/null differ
diff --git a/resources/assets/emojis/rolleyes.gif b/resources/assets/emojis/rolleyes.gif
deleted file mode 100644
index d7f5f2f4..00000000
Binary files a/resources/assets/emojis/rolleyes.gif and /dev/null differ
diff --git a/resources/assets/emojis/sad.gif b/resources/assets/emojis/sad.gif
deleted file mode 100644
index d2ac78c0..00000000
Binary files a/resources/assets/emojis/sad.gif and /dev/null differ
diff --git a/resources/assets/emojis/smile.gif b/resources/assets/emojis/smile.gif
deleted file mode 100644
index 7b1f6d30..00000000
Binary files a/resources/assets/emojis/smile.gif and /dev/null differ
diff --git a/resources/assets/emojis/wind.gif b/resources/assets/emojis/wind.gif
deleted file mode 100644
index d1482880..00000000
Binary files a/resources/assets/emojis/wind.gif and /dev/null differ
diff --git a/resources/assets/scripts/copyAssets.js b/resources/assets/scripts/copyAssets.js
deleted file mode 100644
index 1c8e9e24..00000000
--- a/resources/assets/scripts/copyAssets.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const fs = require('fs');
-const path = require('path');
-const mkdirp = require('mkdirp');
-
-const baseAssetPath = {
- src: path.resolve('resources/assets'),
- target: path.resolve('public/assets')
-};
-
-const emojiPath = {
- src: baseAssetPath.src + '/emojis',
- target: baseAssetPath.target + '/emojis'
-};
-
-mkdirp.sync(emojiPath.target);
-
-const emojis = fs.readdirSync(emojiPath.src);
-
-emojis.forEach((e) => {
- fs.copyFile(`${emojiPath.src}/${e}`, `${emojiPath.target}/${e}`, (e) => {
- if (e) {
- console.error(e);
- }
- });
-});