diff --git a/src/Controllers/CommentController.php b/src/Controllers/CommentController.php index a66b4872..c09d22bf 100644 --- a/src/Controllers/CommentController.php +++ b/src/Controllers/CommentController.php @@ -84,7 +84,8 @@ class CommentController if (InputHelper::get('sender') != 'preview') { CommentModel::save($comment); - LogHelper::log('{user} edited comment in {post}', ['post' => TextHelper::reprPost($comment->getPost())]); + LogHelper::log('{user} edited comment in {post}', [ + 'post' => TextHelper::reprPost($comment->getPost())]); } $context->transport->textPreview = $comment->getText(); StatusHelper::success(); @@ -101,7 +102,8 @@ class CommentController CommentModel::remove($comment); - LogHelper::log('{user} removed comment from {post}', ['post' => TextHelper::reprPost($comment->getPost())]); + LogHelper::log('{user} removed comment from {post}', [ + 'post' => TextHelper::reprPost($comment->getPost())]); StatusHelper::success(); } } diff --git a/src/Controllers/PostController.php b/src/Controllers/PostController.php index e6db8fdd..14a77d77 100644 --- a/src/Controllers/PostController.php +++ b/src/Controllers/PostController.php @@ -502,7 +502,11 @@ class PostController $newSafety = $post->safety; if ($oldSafety != $newSafety) - LogHelper::log('{user} changed safety of {post} to {safety}', ['post' => TextHelper::reprPost($post), 'safety' => PostSafety::toString($post->safety)]); + { + LogHelper::log('{user} changed safety of {post} to {safety}', [ + 'post' => TextHelper::reprPost($post), + 'safety' => PostSafety::toString($post->safety)]); + } } /* tags */ @@ -517,10 +521,18 @@ class PostController $newTags = array_map(function($tag) { return $tag->name; }, $post->getTags()); foreach (array_diff($oldTags, $newTags) as $tag) - LogHelper::log('{user} untagged {post} with {tag}', ['post' => TextHelper::reprPost($post), 'tag' => TextHelper::reprTag($tag)]); + { + LogHelper::log('{user} untagged {post} with {tag}', [ + 'post' => TextHelper::reprPost($post), + 'tag' => TextHelper::reprTag($tag)]); + } foreach (array_diff($newTags, $oldTags) as $tag) - LogHelper::log('{user} tagged {post} with {tag}', ['post' => TextHelper::reprPost($post), 'tag' => TextHelper::reprTag($tag)]); + { + LogHelper::log('{user} tagged {post} with {tag}', [ + 'post' => TextHelper::reprPost($post), + 'tag' => TextHelper::reprTag($tag)]); + } } /* source */ @@ -535,7 +547,11 @@ class PostController $newSource = $post->source; if ($oldSource != $newSource) - LogHelper::log('{user} changed source of {post} to {source}', ['post' => TextHelper::reprPost($post), 'source' => $post->source]); + { + LogHelper::log('{user} changed source of {post} to {source}', [ + 'post' => TextHelper::reprPost($post), + 'source' => $post->source]); + } } /* relations */ @@ -550,10 +566,18 @@ class PostController $newRelatedIds = array_map(function($post) { return $post->id; }, $post->getRelations()); foreach (array_diff($oldRelatedIds, $newRelatedIds) as $post2id) - LogHelper::log('{user} removed relation between {post} and {post2}', ['post' => TextHelper::reprPost($post), 'post2' => TextHelper::reprPost($post2id)]); + { + LogHelper::log('{user} removed relation between {post} and {post2}', [ + 'post' => TextHelper::reprPost($post), + 'post2' => TextHelper::reprPost($post2id)]); + } foreach (array_diff($newRelatedIds, $oldRelatedIds) as $post2id) - LogHelper::log('{user} added relation between {post} and {post2}', ['post' => TextHelper::reprPost($post), 'post2' => TextHelper::reprPost($post2id)]); + { + LogHelper::log('{user} added relation between {post} and {post2}', [ + 'post' => TextHelper::reprPost($post), + 'post2' => TextHelper::reprPost($post2id)]); + } } /* thumbnail */ diff --git a/src/Models/Entities/PostEntity.php b/src/Models/Entities/PostEntity.php index acd58898..cf5b7b1c 100644 --- a/src/Models/Entities/PostEntity.php +++ b/src/Models/Entities/PostEntity.php @@ -108,7 +108,11 @@ class PostEntity extends AbstractEntity continue; if (count($relatedPosts) > $config->browsing->maxRelatedPosts) - throw new SimpleException('Too many related posts (maximum: %d)', $config->browsing->maxRelatedPosts); + { + throw new SimpleException( + 'Too many related posts (maximum: %d)', + $config->browsing->maxRelatedPosts); + } $relatedPosts []= PostModel::findById($relatedId); } @@ -372,7 +376,11 @@ class PostEntity extends AbstractEntity $duplicatedPost = PostModel::findByHash($this->fileHash, false); if ($duplicatedPost !== null and (!$this->id or $this->id != $duplicatedPost->id)) - throw new SimpleException('Duplicate upload: %s', TextHelper::reprPost($duplicatedPost)); + { + throw new SimpleException( + 'Duplicate upload: %s', + TextHelper::reprPost($duplicatedPost)); + } $dstPath = $this->getFullPath(); @@ -407,7 +415,11 @@ class PostEntity extends AbstractEntity $duplicatedPost = PostModel::findByHash($youtubeId, false); if ($duplicatedPost !== null and (!$this->id or $this->id != $duplicatedPost->id)) - throw new SimpleException('Duplicate upload: %s' . TextHelper::reprPost($duplicatedPost)); + { + throw new SimpleException( + 'Duplicate upload: %s', + TextHelper::reprPost($duplicatedPost)); + } return; } @@ -436,7 +448,11 @@ class PostEntity extends AbstractEntity throw new SimpleException('Cannot write into file'); fflush($srcFP); if (ftell($srcFP) > $maxBytes) - throw new SimpleException('File is too big (maximum size: %s)', TextHelper::useBytesUnits($maxBytes)); + { + throw new SimpleException( + 'File is too big (maximum size: %s)', + TextHelper::useBytesUnits($maxBytes)); + } } } finally diff --git a/src/Views/auth-login.phtml b/src/Views/auth-login.phtml index cb827168..45dd31ef 100644 --- a/src/Views/auth-login.phtml +++ b/src/Views/auth-login.phtml @@ -3,7 +3,12 @@ Assets::setSubTitle('authentication form'); Assets::addStylesheet('auth.css'); ?> -
+ +

If you don't have an account yet,
click here to create a new one. diff --git a/src/Views/comment-add.phtml b/src/Views/comment-add.phtml index 5c8a5cb5..8733249d 100644 --- a/src/Views/comment-add.phtml +++ b/src/Views/comment-add.phtml @@ -4,8 +4,10 @@ Assets::addScript('comment-edit.js'); ?>

add comment

diff --git a/src/Views/comment-edit.phtml b/src/Views/comment-edit.phtml index 61909a87..e7f2271a 100644 --- a/src/Views/comment-edit.phtml +++ b/src/Views/comment-edit.phtml @@ -4,8 +4,10 @@ Assets::addScript('comment-edit.js'); ?>

edit comment

diff --git a/src/Views/comment-list.phtml b/src/Views/comment-list.phtml index 66478f9b..508ab12a 100644 --- a/src/Views/comment-list.phtml +++ b/src/Views/comment-list.phtml @@ -31,7 +31,9 @@ Assets::setSubTitle('comments'); count($commentsToDisplay)): ?> - + (more…) diff --git a/src/Views/comment-small.phtml b/src/Views/comment-small.phtml index 15017f0e..09d77879 100644 --- a/src/Views/comment-small.phtml +++ b/src/Views/comment-small.phtml @@ -22,7 +22,9 @@ Assets::addScript('comment-edit.js');
- + name ?> @@ -38,7 +40,9 @@ Assets::addScript('comment-edit.js'); Privilege::EditComment, Access::getIdentity($commenter))): ?> - + edit @@ -48,9 +52,11 @@ Assets::addScript('comment-edit.js'); Access::check(Privilege::DeleteComment, Access::getIdentity($commenter))): ?> - + delete diff --git a/src/Views/index-help.phtml b/src/Views/index-help.phtml index 7f681ffb..d4e39177 100644 --- a/src/Views/index-help.phtml +++ b/src/Views/index-help.phtml @@ -16,7 +16,9 @@ $showTabs = count($tabs) > 1;
  • - +
  • diff --git a/src/Views/index-index.phtml b/src/Views/index-index.phtml index 65ccb915..e162bf2a 100644 --- a/src/Views/index-index.phtml +++ b/src/Views/index-index.phtml @@ -41,7 +41,9 @@ Assets::addStylesheet('index-index.css'); Featured context->featuredPostUser): ?> by - + context->featuredPostUser->name ?> , diff --git a/src/Views/log-view.phtml b/src/Views/log-view.phtml index 8773838e..8f4bfcc1 100644 --- a/src/Views/log-view.phtml +++ b/src/Views/log-view.phtml @@ -13,7 +13,9 @@ Assets::setSubTitle('logs (' . $this->context->transport->name . ')'); ?> + action=" $this->context->transport->name]) ?>"> Keep only lines that contain: diff --git a/src/Views/post-edit.phtml b/src/Views/post-edit.phtml index 22a3cec9..34c912a5 100644 --- a/src/Views/post-edit.phtml +++ b/src/Views/post-edit.phtml @@ -1,5 +1,7 @@ diff --git a/src/Views/post-file-render.phtml b/src/Views/post-file-render.phtml index 7e084010..4a743f68 100644 --- a/src/Views/post-file-render.phtml +++ b/src/Views/post-file-render.phtml @@ -1,5 +1,9 @@ - $this->context->transport->post->name])) ?> -context->transport->post ?> + $this->context->transport->post->name])); +$post = $this->context->transport->post; +?> type == PostType::Image): ?> @@ -7,7 +11,10 @@ - <?= $post->name ?> + <?= $post->name ?> context->imageLink)): ?> @@ -19,10 +26,14 @@ type="mimeType ?>" width="imageWidth ?>" height="imageHeight ?>" - data=" $post->name]) ?>"> + data=" $post->name]) ?>"> - + @@ -40,7 +51,9 @@ diff --git a/src/Views/post-view.phtml b/src/Views/post-view.phtml index 446d6b30..d718cec4 100644 --- a/src/Views/post-view.phtml +++ b/src/Views/post-view.phtml @@ -30,7 +30,9 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;