Projet

Général

Profil

Révision 011029ce

Ajouté par Assos Assos il y a plus de 10 ans

Update views_pdf 1.1 -> 1.3

Voir les différences:

htmltest/sites/all/modules/views_pdf/views_pdf_plugin_display.inc
63 63
  function execute($path_to_store_pdf = '', $destination = 'I') {
64 64

  
65 65
    // Defines external configuration for TCPDF library
66
    $tcpdf_path = drupal_realpath(views_pdf_get_library('tcpdf'));
67
    $cache_path = 'public://views_pdf_cache/';
68
    if(file_prepare_directory($cache_path, FILE_CREATE_DIRECTORY) == TRUE){
66
    if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
67
      $tcpdf_path = drupal_realpath(views_pdf_get_library('tcpdf'));
68
      $cache_path = 'public://views_pdf_cache/';
69
      file_prepare_directory($cache_path, FILE_CREATE_DIRECTORY);
69 70
      global $base_url;
70 71
      define('K_TCPDF_EXTERNAL_CONFIG', TRUE);
71 72
      define('K_PATH_MAIN', dirname($_SERVER['SCRIPT_FILENAME']));
......
79 80
    }
80 81

  
81 82
    if ($this->get_option('default_page_format') == 'custom') {
82
      if (preg_match('/([0-9]+)x([0-9]+)/', $this->get_option('default_page_format_custom'), $result)) {
83
      if (preg_match('~([0-9\.]+)x([0-9\.]+)~', $this->get_option('default_page_format_custom'), $result)) {
83 84
        $format[0] = $result[1]; // width
84 85
        $format[1] = $result[2]; // height
85 86
      }
......
118 119
    }
119 120

  
120 121
    if (empty($path_to_store_pdf)) {
121
      $path_to_store_pdf = $this->view->name;
122
      $path_to_store_pdf = $this->view->get_title();
122 123
    }
123 124

  
124 125
    if (!preg_match('/\.pdf$/', $path_to_store_pdf)) {

Formats disponibles : Unified diff