Restore automatic orientation fix

This commit is contained in:
Flavio Copes
2016-10-13 20:36:14 +02:00
parent 0fa3648fee
commit 4b8af1fe72

View File

@@ -116,8 +116,8 @@ class Excerpts
public static function processLinkExcerpt($excerpt, $page, $type = 'link')
{
$url = $excerpt['element']['attributes']['href'];
$url_parts = parse_url(htmlspecialchars_decode(urldecode($url)));
$actions = [];
// if there is a query, then parse it and build action calls
if (isset($url_parts['query'])) {
@@ -150,10 +150,11 @@ class Excerpts
}
}
}
$url_parts['query'] = http_build_query($actions, null, '&', PHP_QUERY_RFC3986);
}
$actions['fixOrientation'] = true;
$url_parts['query'] = http_build_query($actions, null, '&', PHP_QUERY_RFC3986);
// if no query elements left, unset query
if (empty($url_parts['query'])) {
unset ($url_parts['query']);