Projet

Général

Profil

Révision e9f59ce0

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views_pdf/modules/views_append/views_append.info
7 7
files[] = views_append_handler_append_view.inc
8 8

  
9 9

  
10
; Information added by Drupal.org packaging script on 2014-10-30
11
version = "7.x-1.4"
10
; Information added by Drupal.org packaging script on 2016-02-02
11
version = "7.x-1.5"
12 12
core = "7.x"
13 13
project = "views_pdf"
14
datestamp = "1414683531"
14
datestamp = "1454421840"
15 15

  
drupal7/sites/all/modules/views_pdf/modules/views_view_field/views_view_field.info
7 7
files[] = views_view_field_handler_include_view.inc
8 8

  
9 9

  
10
; Information added by Drupal.org packaging script on 2014-10-30
11
version = "7.x-1.4"
10
; Information added by Drupal.org packaging script on 2016-02-02
11
version = "7.x-1.5"
12 12
core = "7.x"
13 13
project = "views_pdf"
14
datestamp = "1414683531"
14
datestamp = "1454421840"
15 15

  
drupal7/sites/all/modules/views_pdf/views_pdf.info
2 2
description = "Views plugin to export a view as a PDF file."
3 3
dependencies[] = views
4 4
dependencies[] = jquery_update
5
dependencies[] = php
5
dependencies[] = libraries (2.x)
6 6
package = Views
7 7
core = 7.x
8 8

  
......
15 15
files[] = field_plugins/views_pdf_handler_page_number.inc
16 16
files[] = field_plugins/views_pdf_handler_page_break.inc
17 17

  
18
; Information added by Drupal.org packaging script on 2014-10-30
19
version = "7.x-1.4"
18
; Information added by Drupal.org packaging script on 2016-02-02
19
version = "7.x-1.5"
20 20
core = "7.x"
21 21
project = "views_pdf"
22
datestamp = "1414683531"
22
datestamp = "1454421840"
23 23

  
drupal7/sites/all/modules/views_pdf/views_pdf.make
1
api = 2
2
core = 7.x
3

  
4
libraries[tcpdf][type] = "libraries"
5
libraries[tcpdf][download][type] = "file"
6
libraries[tcpdf][download][url] = "https://github.com/tecnickcom/TCPDF/archive/6.2.12.zip"
7
libraries[tcpdf][directory_name] = "tcpdf"
8
libraries[tcpdf][destination] = "libraries"
9

  
10
libraries[fpdi][type] = "libraries"
11
libraries[fpdi][download][type] = "file"
12
libraries[fpdi][download][url] = "http://www.setasign.com/supra/kon2_dl/80506/FPDI-1.5.2.zip"
13
libraries[fpdi][directory_name] = "fpdi"
14
libraries[fpdi][destination] = "libraries"
drupal7/sites/all/modules/views_pdf/views_pdf.module
30 30
  );
31 31
}
32 32

  
33
define('VIEWS_PDF_PHP', (module_exists('php')));
34

  
33 35
/**
34 36
 * This method can be used to load the PDF library class.
35 37
 */
drupal7/sites/all/modules/views_pdf/views_pdf.rules.inc
66 66
  if (!empty($view_id)) {
67 67
    $view = views_get_view($view_id);
68 68

  
69
    $view->set_arguments(explode("\n", $arguments));
69
    $view->set_arguments(preg_split("/\r\n|\n|\r/", $arguments));
70 70

  
71 71
    // Try to get pdf display
72 72
    if (!$view->set_display($display_id)) {
drupal7/sites/all/modules/views_pdf/views_pdf.views.inc
54 54
        'uses hook menu' => TRUE,
55 55
        'use ajax' => FALSE,
56 56
        'use pager' => FALSE,
57
        'use_more' => FALSE,
57
        'use more' => FALSE,
58 58
        'accept attachments' => FALSE,
59 59
        'admin' => t('PDF Page'),
60 60
      ),
drupal7/sites/all/modules/views_pdf/views_pdf_plugin_display.inc
373 373
          '#title' => t('Upload New Template File'),
374 374
        );
375 375

  
376
        $form['#attached']['js'][] = array(
377
          'type' => 'setting',
378
          'data' => array(
379
            'urlIsAjaxTrusted' => array(
380
              $GLOBALS['base_url'] . '/' . current_path() => TRUE,
381
            ),
382
          ),
383
        );
384

  
376 385
        break;
377 386

  
378 387
      case 'displays':
drupal7/sites/all/modules/views_pdf/views_pdf_plugin_row_fields.inc
264 264
        '#description' => t('Specify here the minimal space, which is needed on the page, that the content is placed on the page.'),
265 265
        '#default_value' => isset($this->options['formats'][$field]['render']['minimal_space']) ? $this->options['formats'][$field]['render']['minimal_space'] : 1,
266 266
      );
267

  
268
      $form['formats'][$field]['render']['eval_before'] = array(
269
        '#type' => 'textarea',
270
        '#title' => t('PHP Code Before Output'),
271
        '#default_value' => isset($this->options['formats'][$field]['render']['eval_before']) ? $this->options['formats'][$field]['render']['eval_before'] : '',
272
      );
273
      $form['formats'][$field]['render']['bypass_eval_before'] = array(
274
        '#type' => 'checkbox',
275
        '#title' => t('Use the PHP eval function instead php_eval.'),
276
        '#description' => t("WARNING: If you don't know the risk of using eval leave as it."),
277
        '#default_value' => !empty($this->options['formats'][$field]['render']['bypass_eval_before']) ? $this->options['formats'][$field]['render']['bypass_eval_before'] : FALSE,
278
      );
279

  
280
      $form['formats'][$field]['render']['eval_after'] = array(
281
        '#type' => 'textarea',
282
        '#title' => t('PHP Code After Output'),
283
        '#default_value' => isset($this->options['formats'][$field]['render']['eval_after']) ? $this->options['formats'][$field]['render']['eval_after'] : '',
284
      );
285
      $form['formats'][$field]['render']['bypass_eval_after'] = array(
286
        '#type' => 'checkbox',
287
        '#title' => t('Use the PHP eval function instead php_eval.'),
288
        '#description' => t("WARNING: If you don't know the risk of using eval leave as it."),
289
        '#default_value' => !empty($this->options['formats'][$field]['render']['bypass_eval_after']) ? $this->options['formats'][$field]['render']['bypass_eval_after'] : FALSE,
290
      );
267
      if (user_access('allow php in views pdf') && VIEWS_PDF_PHP) {
268
        $form['formats'][$field]['render']['eval_before'] = array(
269
          '#type' => 'textarea',
270
          '#title' => t('PHP Code Before Output'),
271
          '#default_value' => isset($this->options['formats'][$field]['render']['eval_before']) ? $this->options['formats'][$field]['render']['eval_before'] : '',
272
        );
273
        $form['formats'][$field]['render']['bypass_eval_before'] = array(
274
          '#type' => 'checkbox',
275
          '#title' => t('Use the PHP eval function instead php_eval.'),
276
          '#description' => t("WARNING: If you don't know the risk of using eval leave as it."),
277
          '#default_value' => !empty($this->options['formats'][$field]['render']['bypass_eval_before']) ? $this->options['formats'][$field]['render']['bypass_eval_before'] : FALSE,
278
        );
279

  
280
        $form['formats'][$field]['render']['eval_after'] = array(
281
          '#type' => 'textarea',
282
          '#title' => t('PHP Code After Output'),
283
          '#default_value' => isset($this->options['formats'][$field]['render']['eval_after']) ? $this->options['formats'][$field]['render']['eval_after'] : '',
284
        );
285
        $form['formats'][$field]['render']['bypass_eval_after'] = array(
286
          '#type' => 'checkbox',
287
          '#title' => t('Use the PHP eval function instead php_eval.'),
288
          '#description' => t("WARNING: If you don't know the risk of using eval leave as it."),
289
          '#default_value' => !empty($this->options['formats'][$field]['render']['bypass_eval_after']) ? $this->options['formats'][$field]['render']['bypass_eval_after'] : FALSE,
290
        );
291
      }
291 292

  
292 293
    }
293 294

  
......
325 326
      '#title' => t('Upload New Template File'),
326 327
    );
327 328

  
329
    $form['#attached']['js'][] = array(
330
          'type' => 'setting',
331
          'data' => array(
332
            'urlIsAjaxTrusted' => array(
333
              $GLOBALS['base_url'] . '/' . current_path() => TRUE,
334
            ),
335
          ),
336
        );
337

  
328 338

  
329 339
  }
330 340

  
drupal7/sites/all/modules/views_pdf/views_pdf_plugin_style_table.inc
164 164
        '#default_value' => isset($this->options['info'][$field]['header_style']['render']['is_html']) ? $this->options['info'][$field]['header_style']['render']['is_html'] : 1,
165 165
      );
166 166

  
167
      $form['info'][$field]['header_style']['render']['eval_before'] = array(
168
        '#type' => 'textarea',
169
        '#title' => t('PHP Code Before Output'),
170
        '#default_value' => isset($this->options['info'][$field]['header_style']['render']['eval_before']) ? $this->options['info'][$field]['header_style']['render']['eval_before'] : '',
171
      );
172

  
173
      $form['info'][$field]['header_style']['render']['eval_after'] = array(
174
        '#type' => 'textarea',
175
        '#title' => t('PHP Code After Output'),
176
        '#default_value' => isset($this->options['info'][$field]['header_style']['render']['eval_after']) ? $this->options['info'][$field]['header_style']['render']['eval_after'] : '',
177
      );
167
      if (user_access('allow php in views pdf') && VIEWS_PDF_PHP) {
168
        $form['info'][$field]['header_style']['render']['eval_before'] = array(
169
          '#type' => 'textarea',
170
          '#title' => t('PHP Code Before Output'),
171
          '#default_value' => isset($this->options['info'][$field]['header_style']['render']['eval_before']) ? $this->options['info'][$field]['header_style']['render']['eval_before'] : '',
172
        );
173
        $form['info'][$field]['header_style']['render']['bypass_eval_before'] = array(
174
          '#type' => 'checkbox',
175
          '#title' => t('Use the PHP eval function instead php_eval.'),
176
          '#description' => t("WARNING: If you don't know the risk of using eval leave as it."),
177
          '#default_value' => !empty($this->options['info'][$field]['header_style']['render']['bypass_eval_before']) ? $this->options['info'][$field]['header_style']['render']['bypass_eval_before'] : FALSE,
178
        );
179

  
180
        $form['info'][$field]['header_style']['render']['eval_after'] = array(
181
          '#type' => 'textarea',
182
          '#title' => t('PHP Code After Output'),
183
          '#default_value' => isset($this->options['info'][$field]['header_style']['render']['eval_after']) ? $this->options['info'][$field]['header_style']['render']['eval_after'] : '',
184
        );
185
        $form['info'][$field]['header_style']['render']['bypass_eval_after'] = array(
186
          '#type' => 'checkbox',
187
          '#title' => t('Use the PHP eval function instead php_eval.'),
188
          '#description' => t("WARNING: If you don't know the risk of using eval leave as it."),
189
          '#default_value' => !empty($this->options['info'][$field]['header_style']['render']['bypass_eval_after']) ? $this->options['info'][$field]['header_style']['render']['bypass_eval_after'] : FALSE,
190
        );
191
      }
178 192

  
179 193
      $form['info'][$field]['body_style']['text'] = array(
180 194
        '#type' => 'fieldset',
......
241 255
        '#default_value' => isset($this->options['info'][$field]['body_style']['render']['is_html']) ? $this->options['info'][$field]['body_style']['render']['is_html'] : 1,
242 256
      );
243 257

  
244
      $form['info'][$field]['body_style']['render']['eval_before'] = array(
245
        '#type' => 'textarea',
246
        '#title' => t('PHP Code Before Output'),
247
        '#default_value' => isset($this->options['info'][$field]['body_style']['render']['eval_before']) ? $this->options['info'][$field]['body_style']['render']['eval_before'] : '',
248
      );
249

  
250
      $form['info'][$field]['body_style']['render']['eval_after'] = array(
251
        '#type' => 'textarea',
252
        '#title' => t('PHP Code After Output'),
253
        '#default_value' => isset($this->options['info'][$field]['body_style']['render']['eval_after']) ? $this->options['info'][$field]['body_style']['render']['eval_after'] : '',
254
      );
258
      if (user_access('allow php in views pdf') && VIEWS_PDF_PHP) {
259
        $form['info'][$field]['body_style']['render']['eval_before'] = array(
260
          '#type' => 'textarea',
261
          '#title' => t('PHP Code Before Output'),
262
          '#default_value' => isset($this->options['info'][$field]['body_style']['render']['eval_before']) ? $this->options['info'][$field]['body_style']['render']['eval_before'] : '',
263
        );
264
        $form['info'][$field]['body_style']['render']['bypass_eval_before'] = array(
265
          '#type' => 'checkbox',
266
          '#title' => t('Use the PHP eval function instead php_eval.'),
267
          '#description' => t("WARNING: If you don't know the risk of using eval leave as it."),
268
          '#default_value' => !empty($this->options['info'][$field]['body_style']['render']['bypass_eval_before']) ? $this->options['info'][$field]['body_style']['render']['bypass_eval_before'] : FALSE,
269
        );
270

  
271
        $form['info'][$field]['body_style']['render']['eval_after'] = array(
272
          '#type' => 'textarea',
273
          '#title' => t('PHP Code After Output'),
274
          '#default_value' => isset($this->options['info'][$field]['body_style']['render']['eval_after']) ? $this->options['info'][$field]['body_style']['render']['eval_after'] : '',
275
        );
276
        $form['info'][$field]['body_style']['render']['bypass_eval_after'] = array(
277
          '#type' => 'checkbox',
278
          '#title' => t('Use the PHP eval function instead php_eval.'),
279
          '#description' => t("WARNING: If you don't know the risk of using eval leave as it."),
280
          '#default_value' => !empty($this->options['info'][$field]['body_style']['render']['bypass_eval_after']) ? $this->options['info'][$field]['body_style']['render']['bypass_eval_after'] : FALSE,
281
        );
282
      }
255 283

  
256 284
      $form['info'][$field]['position']['width'] = array(
257 285
        '#type' => 'textfield',
drupal7/sites/all/modules/views_pdf/views_pdf_template.php
406 406
  }
407 407

  
408 408
  protected function renderRow($x, $y, $row, $options, &$view = NULL, $key = NULL, $printLabels = TRUE) {
409
      if ($options['position']['object'] !== 'header_footer') {
410
        $pageDim = $this->getPageDimensions();
409 411

  
410
    $pageDim = $this->getPageDimensions();
411

  
412
    // Render the content if it is not already:
413
    if (is_object($view) && $key != NULL && isset($view->field[$key]) && is_object($view->field[$key]) && !is_string($row)) {
414
      $content = $view->field[$key]->theme($row);
415
    }
416
    elseif (is_string($row)) {
417
      $content = $row;
418
    }
419
    else {
420
      // We got bad data. So return.
421
      return;
422
    }
412
        // Render the content if it is not already:
413
        if (is_object($view) && $key != NULL && isset($view->field[$key]) && is_object($view->field[$key]) && !is_string($row)) {
414
          $content = $view->field[$key]->theme($row);
415
        }
416
        elseif (is_string($row)) {
417
          $content = $row;
418
        }
419
        else {
420
          // We got bad data. So return.
421
          return;
422
        }
423 423

  
424
    if (empty($key) || !empty($view->field[$key]->options['exclude']) || (empty($content) && $view->field[$key]->options['hide_empty'])) {
425
      return '';
426
    }
424
        if (empty($key) || !empty($view->field[$key]->options['exclude']) || (empty($content) && $view->field[$key]->options['hide_empty'])) {
425
          return '';
426
        }
427 427

  
428
    // Apply the hyphenation patterns to the content:
429
    if (!isset($options['text']['hyphenate']) && is_object($view) && is_object($view->display_handler)) {
430
      $options['text']['hyphenate'] = $view->display_handler->get_option('default_text_hyphenate');
431
    }
428
        // Apply the hyphenation patterns to the content:
429
        if (!isset($options['text']['hyphenate']) && is_object($view) && is_object($view->display_handler)) {
430
          $options['text']['hyphenate'] = $view->display_handler->get_option('default_text_hyphenate');
431
        }
432 432

  
433
    if (isset($options['text']['hyphenate']) && $options['text']['hyphenate'] != 'none') {
434
      $patternFile = $options['text']['hyphenate'];
435
      if ($options['text']['hyphenate'] == 'auto' && is_object($row)) {
433
        if (isset($options['text']['hyphenate']) && $options['text']['hyphenate'] != 'none') {
434
          $patternFile = $options['text']['hyphenate'];
435
          if ($options['text']['hyphenate'] == 'auto' && is_object($row)) {
436

  
437
            // Workaround:
438
            // Since "$nodeLanguage = $row->node_language;" does not work anymore,
439
            // we using this:
440
            if (isset($row->_field_data['nid']['entity']->language)) {
441
              $nodeLanguage = $row->_field_data['nid']['entity']->language;
442

  
443
              foreach (self::getAvailableHyphenatePatterns() as $file => $pattern) {
444
                if (stristr($pattern, $nodeLanguage) !== FALSE) {
445
                  $patternFile = $file;
446
                  break;
447
                }
448
              }
449
            }
450
          }
436 451

  
437
        // Workaround:
438
        // Since "$nodeLanguage = $row->node_language;" does not work anymore,
439
        // we using this:
440
        if (isset($row->_field_data['nid']['entity']->language)) {
441
          $nodeLanguage = $row->_field_data['nid']['entity']->language;
452
          $patternFile = views_pdf_get_library('tcpdf') . '/hyphenate_patterns/' . $patternFile;
442 453

  
443
          foreach (self::getAvailableHyphenatePatterns() as $file => $pattern) {
444
            if (stristr($pattern, $nodeLanguage) !== FALSE) {
445
              $patternFile = $file;
446
              break;
454
          if (file_exists($patternFile)) {
455
            if (method_exists('TCPDF_STATIC', 'getHyphenPatternsFromTEX')) {
456
              $hyphen_patterns = TCPDF_STATIC::getHyphenPatternsFromTEX($patternFile);
457
            }
458
            else {
459
              $hyphen_patterns = $this->getHyphenPatternsFromTEX($patternFile);
447 460
            }
448
          }
449
        }
450
      }
451 461

  
452
      $patternFile = views_pdf_get_library('tcpdf') . '/hyphenate_patterns/' . $patternFile;
462
            // Bugfix if you like to print some html code to the PDF, we
463
            // need to prevent the replacement of this tags.
464
            $content = str_replace('>', '>', $content);
465
            $content = str_replace('<', '<', $content);
466
            $content = $this->hyphenateText($content, $hyphen_patterns);
453 467

  
454
      if (file_exists($patternFile)) {
455
        if (method_exists('TCPDF_STATIC', 'getHyphenPatternsFromTEX')) {
456
          $hyphen_patterns = TCPDF_STATIC::getHyphenPatternsFromTEX($patternFile);
457
        }
458
        else {
459
          $hyphen_patterns = $this->getHyphenPatternsFromTEX($patternFile);
468
          }
460 469
        }
461 470

  
462
        // Bugfix if you like to print some html code to the PDF, we
463
        // need to prevent the replacement of this tags.
464
        $content = str_replace('>', '>', $content);
465
        $content = str_replace('<', '<', $content);
466
        $content = $this->hyphenateText($content, $hyphen_patterns);
467

  
468
      }
469
    }
471
        // Set css variable
472
        if (is_object($view) && is_object($view->display_handler)) {
473
          $css_file = $view->display_handler->get_option('css_file');
474
        }
470 475

  
471
    // Set css variable
472
    if (is_object($view) && is_object($view->display_handler)) {
473
      $css_file = $view->display_handler->get_option('css_file');
474
    }
476
        // Render Labels
477
        $prefix = '';
478
        if ($printLabels && !empty($view->field[$key]->options['label'])) {
479
          $prefix = $view->field[$key]->options['label'];
480
          if ($view->field[$key]->options['element_label_colon']) {
481
            $prefix .= ':';
482
          }
483
          $prefix .= ' ';
484
        }
475 485

  
476
    // Render Labels
477
    $prefix = '';
478
    if ($printLabels && !empty($view->field[$key]->options['label'])) {
479
      $prefix = $view->field[$key]->options['label'];
480
      if ($view->field[$key]->options['element_label_colon']) {
481
        $prefix .= ':';
482
      }
483
      $prefix .= ' ';
484
    }
486
        $font_size = empty($options['text']['font_size']) ? $this->defaultFontSize : $options['text']['font_size'] ;
487
        $font_family = ($options['text']['font_family'] == 'default' || empty($options['text']['font_family'])) ? $this->defaultFontFamily : $options['text']['font_family'];
488
        $font_style = is_array($options['text']['font_style']) ? $options['text']['font_style'] : $this->defaultFontStyle;
489
        $textColor = !empty($options['text']['color']) ? $this->parseColor($options['text']['color']) : $this->parseColor($this->defaultFontColor);
490

  
491

  
492
        $w = $options['position']['width'];
493
        $h = $options['position']['height'];
494
        $border = 0;
495
        $align = isset($options['text']['align']) ? $options['text']['align'] : $this->defaultTextAlign;
496
        $fill = 0;
497
        $ln = 1;
498
        $reseth = TRUE;
499
        $stretch = 0;
500
        $ishtml = isset($options['render']['is_html']) ? $options['render']['is_html'] : 1;
501
        $stripHTML = !$ishtml;
502
        $autopadding = TRUE;
503
        $maxh = 0;
504
        $valign = 'T';
505
        $fitcell = FALSE;
506

  
507
        // Run eval before.
508
        if (VIEWS_PDF_PHP) {
509
          if (!empty($options['render']['bypass_eval_before']) && !empty($options['render']['eval_before'])) {
510
            eval($options['render']['eval_before']);
511
          }
512
          elseif (!empty($options['render']['eval_before']))  {
513
            $content = php_eval($options['render']['eval_before']);
514
          }
515
        }
485 516

  
486
    $font_size = empty($options['text']['font_size']) ? $this->defaultFontSize : $options['text']['font_size'] ;
487
    $font_family = ($options['text']['font_family'] == 'default' || empty($options['text']['font_family'])) ? $this->defaultFontFamily : $options['text']['font_family'];
488
    $font_style = is_array($options['text']['font_style']) ? $options['text']['font_style'] : $this->defaultFontStyle;
489
    $textColor = !empty($options['text']['color']) ? $this->parseColor($options['text']['color']) : $this->parseColor($this->defaultFontColor);
490

  
491

  
492
    $w = $options['position']['width'];
493
    $h = $options['position']['height'];
494
    $border = 0;
495
    $align = isset($options['text']['align']) ? $options['text']['align'] : $this->defaultTextAlign;
496
    $fill = 0;
497
    $ln = 1;
498
    $reseth = TRUE;
499
    $stretch = 0;
500
    $ishtml = isset($options['render']['is_html']) ? $options['render']['is_html'] : 1;
501
    $stripHTML = !$ishtml;
502
    $autopadding = TRUE;
503
    $maxh = 0;
504
    $valign = 'T';
505
    $fitcell = FALSE;
506

  
507
    // Run eval before.
508
    if (!empty($options['render']['bypass_eval_before']) && !empty($options['render']['eval_before'])) {
509
      eval($options['render']['eval_before']);
510
    }
511
    elseif (!empty($options['render']['eval_before']))  {
512
      $content = php_eval($options['render']['eval_before']);
513
    }
517
        // Add css if there is a css file set and stripHTML is not active.
518
        if (!empty($css_file) && is_string($css_file) && !$stripHTML && $ishtml && !empty($content)) {
519
          $content = '<link type="text/css" rel="stylesheet" media="all" href="' . $css_file . '" />' . PHP_EOL . $content;
520
        }
514 521

  
515
    // Add css if there is a css file set and stripHTML is not active.
516
    if (!empty($css_file) && is_string($css_file) && !$stripHTML && $ishtml && !empty($content)) {
517
      $content = '<link type="text/css" rel="stylesheet" media="all" href="' . $css_file . '" />' . PHP_EOL . $content;
518
    }
522
        // Set Text Color.
523
        $this->SetTextColorArray($textColor);
519 524

  
520
    // Set Text Color.
521
    $this->SetTextColorArray($textColor);
525
        // Set font.
526
        $this->SetFont($font_family, implode('', $font_style), $font_size);
522 527

  
523
    // Set font.
524
    $this->SetFont($font_family, implode('', $font_style), $font_size);
528
        // Save the last page before starting writing, this
529
        // is needed to dected if we write over a page. Then we need
530
        // to reset the y coordinate for the 'last_writing' position option.
531
        $this->lastWritingPage = $this->getPage();
525 532

  
526
    // Save the last page before starting writing, this
527
    // is needed to dected if we write over a page. Then we need
528
    // to reset the y coordinate for the 'last_writing' position option.
529
    $this->lastWritingPage = $this->getPage();
533
        if ($stripHTML) {
534
          $content = strip_tags($content);
535
        }
530 536

  
531
    if ($stripHTML) {
532
      $content = strip_tags($content);
533
    }
537
        // Write the content of a field to the pdf file:
538
        if (!empty($content)) {
539
          $this->MultiCell($w, $h, $prefix . $content, $border, $align, $fill, $ln, $x, $y, $reseth, $stretch, $ishtml, $autopadding, $maxh, $valign, $fitcell);
540
        }
541
        else {
542
          $this->MultiCell($w, $h, $prefix, $border, $align, $fill, $ln, $x, $y, $reseth, $stretch, $ishtml, $autopadding, $maxh, $valign, $fitcell);
543
        }
534 544

  
535
    // Write the content of a field to the pdf file:
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
    }
545
        // Reset font to default.
546
        $this->SetFont($this->defaultFontFamily, implode('', $this->defaultFontStyle), $this->defaultFontSize);
542 547

  
543
    // Reset font to default.
544
    $this->SetFont($this->defaultFontFamily, implode('', $this->defaultFontStyle), $this->defaultFontSize);
548
        // Run eval after.
549
        if (VIEWS_PDF_PHP) {
550
          if (!empty($options['render']['bypass_eval_after']) && !empty($options['render']['eval_after'])) {
551
            eval($options['render']['eval_after']);
552
          }
553
          elseif (!empty($options['render']['eval_after'])) {
554
            $content = php_eval($options['render']['eval_after']);
555
          }
556
        }
545 557

  
546
    // Run eval after.
547
    if (!empty($options['render']['bypass_eval_after']) && !empty($options['render']['eval_after'])) {
548
      eval($options['render']['eval_after']);
549
    }
550
    elseif (!empty($options['render']['eval_after'])) {
551
      $content = php_eval($options['render']['eval_after']);
552
    }
558
        // Write Coordinates of element.
559
        $this->elements[$key] = array(
560
          'x' => $x,
561
          'y' => $y,
562
          'width' => empty($w) ? ($pageDim['wk'] - $this->rMargin-$x) : $w,
563
          'height' => $this->y - $y,
564
          'page' => $this->lastWritingPage,
565
        );
553 566

  
554
    // Write Coordinates of element.
555
    $this->elements[$key] = array(
556
      'x' => $x,
557
      'y' => $y,
558
      'width' => empty($w) ? ($pageDim['wk'] - $this->rMargin-$x) : $w,
559
      'height' => $this->y - $y,
560
      'page' => $this->lastWritingPage,
561
    );
567
        $this->lastWritingElement = $key;
568
      }
562 569

  
563
    $this->lastWritingElement = $key;
564 570
  }
565 571

  
566 572
  /**
......
773 779

  
774 780
      $rowY += $options['position']['row_height'];
775 781

  
782
      $view->row_index++;
776 783
    }
777 784

  
778 785
    $this->SetY($rowY + $options['position']['row_height']);

Formats disponibles : Unified diff