mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-24 03:59:08 -05:00
refactor: encapsed strings to sprintf
This commit is contained in:
@@ -101,11 +101,11 @@ class CommentController extends Controller
|
||||
// Auto Shout
|
||||
if ($comment->anon == 0) {
|
||||
$this->chat->systemMessage(
|
||||
"[url={$profile_url}]{$user->username}[/url] has left a comment on article [url={$article_url}]{$article->title}[/url]"
|
||||
sprintf('[url=%s]%s[/url] has left a comment on article [url=%s]%s[/url]', $profile_url, $user->username, $article_url, $article->title)
|
||||
);
|
||||
} else {
|
||||
$this->chat->systemMessage(
|
||||
"An anonymous user has left a comment on article [url={$article_url}]{$article->title}[/url]"
|
||||
sprintf('An anonymous user has left a comment on article [url=%s]%s[/url]', $article_url, $article->title)
|
||||
);
|
||||
}
|
||||
if ($this->tag->hasTags($request->input('content'))) {
|
||||
@@ -192,11 +192,11 @@ class CommentController extends Controller
|
||||
// Auto Shout
|
||||
if ($comment->anon == 0) {
|
||||
$this->chat->systemMessage(
|
||||
"[url={$profile_url}]{$user->username}[/url] has left a comment on playlist [url={$playlist_url}]{$playlist->name}[/url]"
|
||||
sprintf('[url=%s]%s[/url] has left a comment on playlist [url=%s]%s[/url]', $profile_url, $user->username, $playlist_url, $playlist->name)
|
||||
);
|
||||
} else {
|
||||
$this->chat->systemMessage(
|
||||
"An anonymous user has left a comment on playlist [url={$playlist_url}]{$playlist->name}[/url]"
|
||||
sprintf('An anonymous user has left a comment on playlist [url=%s]%s[/url]', $playlist_url, $playlist->name)
|
||||
);
|
||||
}
|
||||
if ($this->tag->hasTags($request->input('content'))) {
|
||||
@@ -287,11 +287,11 @@ class CommentController extends Controller
|
||||
// Auto Shout
|
||||
if ($comment->anon == 0) {
|
||||
$this->chat->systemMessage(
|
||||
"[url={$profile_url}]{$user->username}[/url] has left a comment on Torrent [url={$torrent_url}]{$torrent->name}[/url]"
|
||||
sprintf('[url=%s]%s[/url] has left a comment on Torrent [url=%s]%s[/url]', $profile_url, $user->username, $torrent_url, $torrent->name)
|
||||
);
|
||||
} else {
|
||||
$this->chat->systemMessage(
|
||||
"An anonymous user has left a comment on torrent [url={$torrent_url}]{$torrent->name}[/url]"
|
||||
sprintf('An anonymous user has left a comment on torrent [url=%s]%s[/url]', $torrent_url, $torrent->name)
|
||||
);
|
||||
}
|
||||
if ($this->tag->hasTags($request->input('content'))) {
|
||||
@@ -378,11 +378,11 @@ class CommentController extends Controller
|
||||
// Auto Shout
|
||||
if ($comment->anon == 0) {
|
||||
$this->chat->systemMessage(
|
||||
"[url={$profile_url}]{$user->username}[/url] has left a comment on Request [url={$tr_url}]{$tr->name}[/url]"
|
||||
sprintf('[url=%s]%s[/url] has left a comment on Request [url=%s]%s[/url]', $profile_url, $user->username, $tr_url, $tr->name)
|
||||
);
|
||||
} else {
|
||||
$this->chat->systemMessage(
|
||||
"An anonymous user has left a comment on Request [url={$tr_url}]{$tr->name}[/url]"
|
||||
sprintf('An anonymous user has left a comment on Request [url=%s]%s[/url]', $tr_url, $tr->name)
|
||||
);
|
||||
}
|
||||
//Notification
|
||||
@@ -463,9 +463,9 @@ class CommentController extends Controller
|
||||
$uploader_url = hrefProfile($uploader);
|
||||
|
||||
$thankArray = [
|
||||
"Thanks for the upload [url={$uploader_url}][color={$uploader->group->color}][b]{$uploader->username}[/b][/color][/url] :vulcan_tone2:",
|
||||
"Beautiful upload [url={$uploader_url}][color={$uploader->group->color}][b]{$uploader->username}[/b][/color][/url] :fire:",
|
||||
"Cheers [url={$uploader_url}][color={$uploader->group->color}][b]{$uploader->username}[/b][/color][/url] for the upload :beers:",
|
||||
sprintf('Thanks for the upload [url=%s][color=%s][b]%s[/b][/color][/url] :vulcan_tone2:', $uploader_url, $uploader->group->color, $uploader->username),
|
||||
sprintf('Beautiful upload [url=%s][color=%s][b]%s[/b][/color][/url] :fire:', $uploader_url, $uploader->group->color, $uploader->username),
|
||||
sprintf('Cheers [url=%s][color=%s][b]%s[/b][/color][/url] for the upload :beers:', $uploader_url, $uploader->group->color, $uploader->username),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -506,7 +506,7 @@ class CommentController extends Controller
|
||||
$torrent_url = hrefTorrent($torrent);
|
||||
$profile_url = hrefProfile($user);
|
||||
$this->chat->systemMessage(
|
||||
"[url={$profile_url}]{$user->username}[/url] has left a comment on Torrent [url={$torrent_url}]{$torrent->name}[/url]"
|
||||
sprintf('[url=%s]%s[/url] has left a comment on Torrent [url=%s]%s[/url]', $profile_url, $user->username, $torrent_url, $torrent->name)
|
||||
);
|
||||
|
||||
return redirect()->route('torrent', ['id' => $torrent->id])
|
||||
|
||||
Reference in New Issue
Block a user