Commit 4f4f16b9 authored by DeekshaPrabhuB's avatar DeekshaPrabhuB Committed by Simon Perdrisat
Browse files

Issue #3117692 by davidiio, Deeksha B, gagarine: Mark as compatible with Drupal 9

parent c52dada0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
    "type": "drupal-module",
    "license": "GPL-2.0+",
    "require": {
        "pclzip/pclzip": "^2.8"
        "pclzip/pclzip": "^2.8",
        "drupal/core": "^8.8 || ^9"
    }
}
+1 −2
Original line number Diff line number Diff line
name: Download
description: 'Provides a download link with compressed files'
core: 8.x
version: 7.x-2.5
core_version_requirement: ^8.8 || ^9
project: download
datestamp: '1387397905'
type: module
+2 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@

namespace Drupal\download\Controller;

use Drupal\Component\Utility\Html;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Entity\Entity;
use Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem;
@@ -78,7 +79,7 @@ class DefaultController extends ControllerBase {

  private function _download_get_filename($filename, $entity, $entity_type) {

    $fn = \Drupal::token()->replace(\Drupal\Component\Utility\Html::escape($filename), array($entity_type => $entity));
    $fn = \Drupal::token()->replace(Html::escape($filename), array($entity_type => $entity));
    $fn = preg_replace("/[^a-zA-Z0-9\.\-_]/", "", $fn);

    return $fn;
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ class DownloadLinkFormatter extends FormatterBase {
            foreach($files as $file) {
              $fileEntity = $file->entity;
              $uri = $fileEntity->getFileUri();
              if (file_valid_uri($uri)) {
              if (\Drupal::service('stream_wrapper_manager')->isValidUri($uri)) {
                $valid_file_found = TRUE;
                $fname = $items->getName();
              }