Skip to content

Commit

Permalink
Merge pull request #550 from oat-sa/fix/TR-2853/dev-item-media-resolv…
Browse files Browse the repository at this point in the history
…er-update

fix/TR-2853/item-media-resolver-update
  • Loading branch information
augustas authored Dec 2, 2021
2 parents 6dedc90 + 634614c commit be22aed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions models/classes/media/ItemMediaResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright (c) 2015 (original work) Open Assessment Technologies SA;
* Copyright (c) 2021 (original work) Open Assessment Technologies SA;
*
*
*/
Expand All @@ -27,7 +27,7 @@

class ItemMediaResolver extends TaoMediaResolver
{

private $localMediaSource;

public function __construct($item, $lang)
Expand All @@ -41,7 +41,7 @@ public function __construct($item, $lang)
public function resolve($url)
{
$urlParts = parse_url($url);
if (!isset($urlParts['scheme']) || !isset($urlParts['host'])) {
if (!isset($urlParts['scheme']) || (!isset($urlParts['host']) && $urlParts['scheme'] !== 'data')) {
return new MediaAsset($this->localMediaSource, ltrim($url, '/'));
} else {
return parent::resolve($url);
Expand Down

0 comments on commit be22aed

Please sign in to comment.