Projet

Général

Profil

Révision 11b63505

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views_pdf/views_pdf_template.php
14 14
 * Get the depending classes.
15 15
 */
16 16
require_once views_pdf_get_library('tcpdf') . '/tcpdf.php';
17
require_once views_pdf_get_library('fpdi') . '/fpdi2tcpdf_bridge.php';
17

  
18
if (file_exists(views_pdf_get_library('fpdi') . '/fpdi_bridge.php')) {
19
  require_once views_pdf_get_library('fpdi') . '/fpdi_bridge.php';
20
}
21
else {
22
  require_once views_pdf_get_library('fpdi') . '/fpdi2tcpdf_bridge.php';
23
}
24

  
18 25
require_once views_pdf_get_library('fpdi') . '/fpdi.php';
19 26

  
20 27

  
......
194 201
  /**
195 202
   * Parse color input into an array.
196 203
   *
197
   * @param string $color Color entered by the user
198
   * @return array color as an array
204
   * @param string $color
205
   *   Color entered by the user
206
   *
207
   * @return array
208
   *   Color as an array
199 209
   */
200 210
  public function parseColor($color) {
201 211
    $color = trim($color, ', ');
......
400 410
    $pageDim = $this->getPageDimensions();
401 411

  
402 412
    // Render the content if it is not already:
403
    if (is_object($view) && $key != NULL && isset($view->field[$key]) && is_object($view->field[$key])) {
413
    if (is_object($view) && $key != NULL && isset($view->field[$key]) && is_object($view->field[$key]) && !is_string($row)) {
404 414
      $content = $view->field[$key]->theme($row);
405 415
    }
406 416
    elseif (is_string($row)) {
......
523 533
    }
524 534

  
525 535
    // Write the content of a field to the pdf file:
526
    $this->MultiCell($w, $h, $prefix . $content, $border, $align, $fill, $ln, $x, $y, $reseth, $stretch, $ishtml, $autopadding, $maxh, $valign, $fitcell);
536
    if (!empty($content)) {
537
      $this->MultiCell($w, $h, $prefix . $content, $border, $align, $fill, $ln, $x, $y, $reseth, $stretch, $ishtml, $autopadding, $maxh, $valign, $fitcell);
538
    }
539
    else {
540
      $this->MultiCell($w, $h, $prefix, $border, $align, $fill, $ln, $x, $y, $reseth, $stretch, $ishtml, $autopadding, $maxh, $valign, $fitcell);
541
    }
527 542

  
528 543
    // Reset font to default.
529 544
    $this->SetFont($this->defaultFontFamily, implode('', $this->defaultFontStyle), $this->defaultFontSize);
......
692 707
      $this->SetX($x);
693 708
      $this->setPage($page);
694 709

  
695
      $this->renderRow($x, $y, $column->options['label'], $headerOptions);
710
      $this->renderRow($x, $y, $column->options['label'], $headerOptions, $view, $id, FALSE);
696 711
      $x += $headerOptions['position']['width'];
697 712
    }
698 713

  

Formats disponibles : Unified diff