Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: restore red background on laravel-debugbar timings #2671

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions app/Support/Shortcode/Shortcode.php
wescopeland marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ private function autolinkRetroachievementsUrls(string $text): string
) # End negative lookahead assertion.
~ix',
function ($matches) {
$subdomain = isset($matches[1]) ? $matches[1] : '';
$subdomain = $matches[1];
$path = isset($matches[2]) ? '/' . $matches[2] : '';

return '<a href="https://' . $subdomain . 'retroachievements.org' . $path . '">https://' . $subdomain . 'retroachievements.org' . $path . '</a>';
Expand Down Expand Up @@ -457,19 +457,16 @@ function ($matches) {
$videoId = $matches[1];
$query = [];

// Are there additional query parameters in the URL?
if (isset($matches[2])) {
// Parse the query parameters and populate them into $query.
parse_str(ltrim($matches[2], '?'), $query);
// Parse the query parameters and populate them into $query.
parse_str(ltrim($matches[2], '?'), $query);

// Check if the "t" parameter (timestamp) is present.
if (isset($query['t'])) {
// "t" has to be converted to a time compatible with youtube-nocookie.com embeds.
$query['start'] = $this->convertYouTubeTime($query['t']);
// Check if the "t" parameter (timestamp) is present.
if (isset($query['t'])) {
// "t" has to be converted to a time compatible with youtube-nocookie.com embeds.
$query['start'] = $this->convertYouTubeTime($query['t']);

// Once converted, remove the "t" parameter so we don't accidentally duplicate it.
unset($query['t']);
}
// Once converted, remove the "t" parameter so we don't accidentally duplicate it.
unset($query['t']);
}

$query = http_build_query($query);
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"torann/geoip": "^3.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.7",
"barryvdh/laravel-debugbar": "^3.13.5",
"barryvdh/laravel-ide-helper": "^3.1",
"brianium/paratest": "^7.2",
"driftingly/rector-laravel": "^0.26.0",
Expand Down
Loading
Loading