From a48f30e8a4e10c8aa3a8ab9c9c53a6537147bc24 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Thu, 9 Mar 2017 01:57:05 +0100 Subject: [PATCH] Misc * edited example in README.md to be more clear * fixed a typo in RedButton template. * fixed a typo in comment ajax. Can now use sticky again. * fixed a logic error in comment reply js. do not line break image sources. --- README.md | 5 +++-- includes/ajaxHandler/comment.class.php | 1 + static/js/global.js | 2 +- template/bricks/redButtons.tpl.php | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c3adf7a5..cb322797 100644 --- a/README.md +++ b/README.md @@ -80,8 +80,9 @@ Calculate.Gameoject.Zone.Area.Data = 1 6. reencode the audio files. WAV-files need to be reencoded as `ogg/vorbis` and some MP3s may identify themselves as `application/octet-stream` instead of `audio/mpeg`. example for ffmpeg ``` -find path/to/extracted/files/ -name "*.wav" -exec ffmpeg -hide_banner -y -i {} -acodec libvorbis {}.ogg \; # file.wav -> file.wav.ogg -find path/to/extracted/files/ -name "*.mp3" -exec ffmpeg -hide_banner -y -i {} -f mp3 -acodec libmp3lame {}.mp3 \; # file.mp3 -> file.mp3.mp3 +cd path/to/mpqdata/ +find -name "*.wav" -exec ffmpeg -hide_banner -y -i {} -acodec libvorbis {}.ogg \; # file.wav -> file.wav.ogg +find -name "*.mp3" -exec ffmpeg -hide_banner -y -i {} -f mp3 -acodec libmp3lame {}.mp3 \; # file.mp3 -> file.mp3.mp3 ``` 7. run the initial setup from the CLI `php aowow --firstrun`. It should guide you through with minimal input required from your end. diff --git a/includes/ajaxHandler/comment.class.php b/includes/ajaxHandler/comment.class.php index 71c8a0ae..ae8d39cf 100644 --- a/includes/ajaxHandler/comment.class.php +++ b/includes/ajaxHandler/comment.class.php @@ -19,6 +19,7 @@ class AjaxComment extends AjaxHandler 'remove' => [FILTER_SANITIZE_NUMBER_INT, null], 'commentId' => [FILTER_SANITIZE_NUMBER_INT, null], 'replyId' => [FILTER_SANITIZE_NUMBER_INT, null], + 'sticky' => [FILTER_SANITIZE_NUMBER_INT, null], // 'username' => [FILTER_SANITIZE_STRING, 0xC] // FILTER_FLAG_STRIP_LOW | *_HIGH ); diff --git a/static/js/global.js b/static/js/global.js index 97212015..1a4b3e1f 100644 --- a/static/js/global.js +++ b/static/js/global.js @@ -13021,7 +13021,7 @@ Listview.templates = { var replyHtml = Markup.toHtml(reply.body, {allow: Markup.CLASS_USER, mode: Markup.MODE_REPLY, roles: 0, locale: comment.locale}); replyHtml = replyHtml.replace(/[^\s<>]{81,}/, function(text) { - if(text.substring(0, 5) == 'href') + if(text.substring(0, 4) == 'href' || text.substring(0, 3) == 'src') return text; var ret = ''; diff --git a/template/bricks/redButtons.tpl.php b/template/bricks/redButtons.tpl.php index 344fcf6c..6a83e59e 100644 --- a/template/bricks/redButtons.tpl.php +++ b/template/bricks/redButtons.tpl.php @@ -16,7 +16,7 @@ endif; // ingame-links/markdown/ect if (isset($this->redButtons[BUTTON_LINKS])): if ($b = $this->redButtons[BUTTON_LINKS]): - echo ' "'"]).');">'.Lang::main('links').''.Lang::main('links').''; + echo ' "'"]).');">'.Lang::main('links').''.Lang::main('links').''; else: echo ''.Lang::main('links').''.Lang::main('links').''; endif; @@ -25,7 +25,7 @@ endif; // view in 3D if (isset($this->redButtons[BUTTON_VIEW3D])): if ($b = $this->redButtons[BUTTON_VIEW3D]): // json_encode puts property names in brackets wich is not cool with inline javascript - echo ' "'"]).')">'.Lang::main('view3D').''.Lang::main('view3D').''; + echo ' "'"]).')">'.Lang::main('view3D').''.Lang::main('view3D').''; else: echo ''.Lang::main('view3D').''.Lang::main('view3D').''; endif;