Project

General

Profile

Revision 011029ce

Added by Assos Assos over 10 years ago

Update views_pdf 1.1 -> 1.3

View differences:

htmltest/sites/all/modules/views_pdf/views_pdf_template.php
245 245
    $options['render'] += array(
246 246
      'eval_before' => '',
247 247
      'eval_after' => '',
248
      'bypass_eval_before' => FALSE,
249
      'bypass_eval_after' => FALSE,
248 250
    );
249 251

  
250 252
    $x = $y = 0;
......
386 388

  
387 389
    }
388 390

  
389
    if ($key !== NULL && $view->field[$key]->theme($row)) {
391
    if ($key !== NULL && $view->field[$key]->theme($row) || !empty($row)) {
390 392
      $this->SetX($x);
391 393
      $this->SetY($y);
392 394
      $this->renderRow($x, $y, $row, $options, $view, $key, $printLabels);
......
409 411
      return;
410 412
    }
411 413

  
412
    if (!empty($view->field[$key]->options['exclude']) || (empty($content) && $view->field[$key]->options['hide_empty'])) {
414
    if (empty($key) || !empty($view->field[$key]->options['exclude']) || (empty($content) && $view->field[$key]->options['hide_empty'])) {
413 415
      return '';
414 416
    }
415 417

  
......
493 495
    $fitcell = FALSE;
494 496

  
495 497
    // Run eval before.
496
    if ($options['render']['bypass_eval_before'] && !empty($options['render']['eval_before'])) {
498
    if (!empty($options['render']['bypass_eval_before']) && !empty($options['render']['eval_before'])) {
497 499
      eval($options['render']['eval_before']);
498 500
    }
499 501
    elseif (!empty($options['render']['eval_before']))  {
......
527 529
    $this->SetFont($this->defaultFontFamily, implode('', $this->defaultFontStyle), $this->defaultFontSize);
528 530

  
529 531
    // Run eval after.
530
    if ($options['render']['bypass_eval_after'] && !empty($options['render']['eval_alter'])) {
532
    if (!empty($options['render']['bypass_eval_after']) && !empty($options['render']['eval_after'])) {
531 533
      eval($options['render']['eval_after']);
532 534
    }
533
    elseif (!empty($options['render']['eval_alter'])) {
535
    elseif (!empty($options['render']['eval_after'])) {
534 536
      $content = php_eval($options['render']['eval_after']);
535 537
    }
536 538

  
......
813 815
  /**
814 816
   * This method adds a new page to the PDF.
815 817
   */
816
  public function addPage($path = NULL, $reset = FALSE, $numbering = 'main') {
818
  public function addPage($orientation = '', $format = '', $keepmargins = false, $tocpage = false, $path = NULL, $reset = FALSE, $numbering = 'main') {
817 819

  
818 820
    // Do not add any new page, if we are writing
819 821
    // in the footer or header.

Also available in: Unified diff